ActiveMQ RabbitMQ Kafka Contrast

Source: Internet
Author: User
Tags zookeeper rabbitmq

Objective:

Activemq and RabbitMq and Kafka in the previous projects have been used in succession, of course, for the three did not have a specific comparison, the following excerpt some online about these three comparisons, I have seen after I feel

It is possible to have a clearer feedback of these three specific cases that have been used in the scene, with the following specific comparisons:


1) TPS Comparison:
Kafka highest, RabbitMq second, ActiveMq worst.

2) Throughput Comparison:
Kafka has high throughput, internal batch processing with message, zero-copy mechanism, data storage and acquisition are Local disk order batch operation, with O (1) complexity, message processing efficiency is very high.
RABBITMQ less than Kafka in terms of throughput, their starting point is different, RABBITMQ support reliable delivery of messages, support transactions, do not support batch operations; Storage-based reliability requires storage to be memory or hard disk.

3) In terms of the architecture model:
RABBITMQ follows the AMQP protocol, RABBITMQ's broker is composed of Exchange,binding,queue, where exchange and Binding make up the routing key of the message The client producer communicates with the channel and server, consumer gets the message from the queue for consumption (long connection, queue messages are pushed to the consumer side, consumer loop reads data from the input stream). RABBITMQ is the broker-centric, with a message confirmation mechanism.

Kafka adheres to the general MQ architecture, Producer,broker,consumer, consumer-centric, the consumer information of the message is saved on the client consumer, consumer the bulk pull data from the broker based on the point of consumption , no message acknowledgement mechanism.

4) In terms of usability,
RABBITMQ supports Miror queue, Master queue invalidation, Miror queue takeover.
The Kafka broker supports the main standby mode.

ACTIVEMQ also supports the main standby mode.

5) In the context of cluster load balancing,
Kafka uses zookeeper to manage the broker, consumer in the cluster, can register topic to zookeeper, and zookeeper to save the broker information corresponding to producer through the topic coordination mechanism. Can be sent randomly or polled to the broker, and producer can specify the Shard based on semantics, and the message is sent to a shard on the broker.

RABBITMQ load balancing requires a separate loadbalancer for support.

Comprehensive comparison:
ActiveMQ: The long-established open source project has been used in many products, The implementation of the JMS1.1 specification, can be easily fused with SPRING-JMS, the implementation of a variety of protocols, not light enough (source code than ROCKETMQ), support persistent to the database, the number of queues more support is not good.
RabbitMq:
It is more mature than Kafka, supports AMQP transaction processing, RABBITMQ over Kafka in terms of reliability, and exceeds activemq in performance.
Kafka:
Kafka Design is the original intention is to handle the log, not support AMQP transaction processing, can be regarded as a log system, very strong, so it does not have a mature MQ should have the features
Kafka's performance (throughput, TPS) is stronger than RABBITMQ, and if the fast processing used to make large amounts of data is superior to RABBITMQ.

The following is a detailed comparison of online references:
Original Picture: http://blog.csdn.net/oMaverick1/article/details/51331004

PS: Picture may be a little small, you can right-click Save to the desktop and then view



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.