Comparison of RabbitMQ, Kafka, ActiveMQ


Hi Folks! In this blog, we will discuss the comparison of Kafka, RabbitMQ and ActiveMQ.

Comparison:

Kafka:

Because of its partitions, Kafka Provides message ordering. Kafka message lifetime is infinite but it is bound to message retention policy, which is 1MB by default. Over that, Kafka guarantees that the whole batch of messages either fail or pass. Kafka can send 1 Million messages/sec.

RabbitMQ:

RabbitMQ does not support Message ordering. It is a queue so it will retain messages only till the acknowledgment is provided back to the producer. Along with this, message retention of 128Mb is preferable. Even in relation to transactions involving a single queue, RabbitMQ doesn’t guarantee atomicity. In RabbitMQ, you can specify message priorities, and consumed messages with high priority at the onset. RabbitMQ can send 4K-10K messages/sec.

ActiveMQ:

ActiveMQ does not support any message ordering. It also does not retain messages after its time to live. If any message is not delivered before it exceeds its time to live, it will be discarded by the server. Usually, 32MB is preferable as message retention for ActiveMQ. As this protocol is based on JMS, it is designed to guarantee reliable delivery of messages. ActiveMQ does support message priority but it doesn’t strictly implement.

Use cases: 

  • Kafka:
    1. Streams with sophisticated routing, throughput of 100K/sec or higher, and partitioned ordering “at least once.”
    2. Applications requiring a stream history, delivered in “at least once” partitioned ordering. A “replay” of the event feed is available to clients.
    3. Modeling changes to a system as a series of events is known as event sourcing.
    4. Stream processing data in multi-stage pipelines. The pipelines produce real-time data flow visualisations.
  • RabbitMQ:
    1. Applications that need to support legacy protocols, such as STOMP, MQTT, AMQP, 0-9-1.
    2. Per-message granular control over consistency/set of guarantees.
    3. Complex routing to consumers
    4. Applications that need a variety of publish/subscribe, point-to-point request/reply messaging capabilities.
  • ActiveMQ:
    1. Web Portals: Asynchronous Messaging across modules
    2. Order Processing Systems Integration
    3. Partners/Clients Messaging/Broadcasting System
    4. IoT messaging

Leave A Comment

Your email address will not be published. Required fields are marked *