[Message Queue MQ] Comparison of various MQs

This article is reproduced from: http://blog.csdn.net/sunxinhere/article/details/7968886#comments


At present, there are many MQ products in the industry. We make the following comparisons:

RabbitMQ

It is an open source message queue written in Erlang, which supports many protocols: AMQP, XMPP, SMTP, STOMP, which is exactly what makes it very heavyweight and more suitable for enterprise-level development. At the same time, a broker (Broker) architecture is implemented, which means that messages are queued in the central queue before being sent to the client. It has good support for routing, load balance or data persistence.

Redis

It is a Key-Value NoSQL database with active development and maintenance. Although it is a Key-Value database storage system, it supports MQ functions, so it can be used as a lightweight queue service. For the enqueue and dequeue operations of RabbitMQ and Redis, each is executed 1 million times, and the execution time is recorded every 100,000 times. The test data is divided into four different sizes of 128Bytes, 512Bytes, 1K and 10K. Experiments show that: when entering the queue, when the data is relatively small, the performance of Redis is higher than that of RabbitMQ, and if the data size exceeds 10K, Redis is unbearably slow; when leaving the queue, regardless of the data size, Redis shows very good performance , while the dequeue performance of RabbitMQ is much lower than that of Redis.

 

join the team

out of the team

 

128B

512B

1K

10K

128B

512B

1K

10K

Redis

16088

15961

17094

25

15955

20449

18098

9355

RabbitMQ

10627

9916

9370

2366

3219

3174

2982

1588

ZeroMQ

Known as the fastest message queue system, especially for high-throughput demand scenarios. ZMQ can implement advanced/complex queues that RabbitMQ is not good at, but developers need to combine multiple technical frameworks by themselves. The technical complexity is a challenge to the successful application of this MQ. ZeroMQ has a unique non-middleware model, you don't need to install and run a message server or middleware because your application will act as this service. All you need is a simple reference to the ZeroMQ library, which can be installed using NuGet, and you can happily send messages between applications. But ZeroMQ only provides non-persistent queues, which means that if the machine goes down, the data will be lost. Among them, Twitter's Storm uses ZeroMQ as the transmission of data streams.

ActiveMQ

Is a sub-project under Apache. Similar to ZeroMQ, it can implement queues in broker and peer-to-peer technology. At the same time, similar to RabbitMQ, it can efficiently implement advanced application scenarios with a small amount of code. RabbitMQ, ZeroMQ, ActiveMQ all support commonly used multiple language clients C++, Java, .Net, Python, Php, Ruby, etc.

Jafka/Kafka

Kafka is a sub-project under Apache. It is a high-performance cross-language distributed Publish/Subscribe message queue system. Jafka is incubated on top of Kafka, which is an upgraded version of Kafka. It has the following characteristics: fast persistence, message persistence can be performed under O(1) system overhead; high throughput, a throughput rate of 10W/s can be achieved on an ordinary server; a complete distributed system, Broker , Producer, and Consumer all natively and automatically support distribution and automatically achieve complex balance; support Hadoop data parallel loading, for log data and offline analysis systems like Hadoop, but require real-time processing constraints, this is a feasible solution. . Kafka unifies online and offline message processing through Hadoop's parallel loading mechanism, which is also important to the system studied in this topic. Apache Kafka is a very lightweight messaging system relative to ActiveMQ, and besides being very performant, it is a distributed system that works well.

Some other queue lists HornetQ, Apache Qpid, Sparrow, Starling, Kestrel, Beanstalkd, Amazon SQS are not analyzed one by one.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326038712&siteId=291194637