Article source: blog.csdn.net/chszs/artic…
Short for Message Queue, Message queues (MQ) are an application-to-application communication method. Applications communicate by reading and writing messages in and out of queues (data for the application) without the need for dedicated connections to link them. Elimination passing refers to programs communicating with each other by sending data in messages rather than by direct calls, which are typically used for techniques such as remote procedure calls. Queuing refers to applications communicating through queues. The use of queues removes the need for receiving and sending applications to execute simultaneously. \
\
RabbitMQ, ActiveMQ, and ZeroMQ are all excellent messaging middleware, but which one should we choose for our project? Many developers face this dilemma. I’m going to do a comparison of the three message-oriented middleware to give you a sense of what’s going on.
RabbitMQ(www.rabbitmq.com/) is a leading implementation of the AMQP protocol that implements a Broker architecture, meaning messages can be queued on a central node before being sent to a client. This feature makes RabbitMQ easy to use and deploy, suitable for many scenarios such as routing, load balancing or message persistence, with message queues requiring only a few lines of code. However, this makes it less scalable and slower because the central node adds latency and message encapsulation is larger.
ZeroMQ(zeromq.org/) is a very lightweight messaging system developed specifically for high throughput/low latency scenarios and often found in financial applications. ZeroMQ supports many advanced messaging scenarios compared to RabbitMQ, but you have to implement the blocks of the ZeroMQ framework (Socket, Device, etc.). ZeroMQ is very flexible, but you have to learn its 80-page manual (read it if you’re writing a distributed system).
ActiveMQ(activemq.apache.org/In between, like ZemoMQ, it can be deployed in both proxy and P2P modes. Like RabbitMQ, it is easy to implement advanced scenarios with low cost. It is known as the “Swiss Army knife” of messaging middleware.
It should be noted that ActiveMQ’s next generation product is Apollo(activemq.apache.org/apollo/).
Finally, these three products:
1. Both have client APIS and support multiple programming languages;
2. Both have extensive documentation;
3. Both offer positive support. \