Apache Kafka Vs ActiveMQ

ActiveMQ and Kafka are two different kind of Messaging System. ActiveMQ has been for long in the industry with full stability and so rich feature whereas Kafka is the new beast which bring a totally new flavour to handle the large volume of data and high throughput.

Lets starts with the similarities and differencies between ActiveMQ and Apache Kafka

1) JMS : ActiveMQ is an implementation of JMS(Java Messaging Service) API whereas Apache Kafka is totally different distributed message system which uses its own protocol.

2) Performance : Message publishing speed in ActiveMQ is 300 msg/sec over  a single thread whereas Message publishing speed in Kafka is 165k  msg/sec over a single thread.

3) Message Ordering  :  Kafka ensures that the messages are received in the order in which they were sent at the partition level. JMS does not have any such contracts.

4) Persistence of Message : Kafka brokers store the messages for a specified period of time irrespective of whether the message has been picked up by the consumers or not.
JMS providers typically provide either in memory or disk based storage of messages.

5) Message Retrival : In ActiveMQ once the message is consumed and acknowledgement is being provided by the consumer , message is deleted from the queue whereas in Kafka old message can be retrived by  using the offset value.


These are all the few differences between the ActiveMQ and Apache Kafka . Although there is no comparison between them since both the queue belongs to totally different league.


When one should use ActiveMQ or when one should  use Apache Kafka :

Apache Kafka should be used in the scenario where throughput is very high and when one has to process very large volume of data per second .

ActiveMQ provides very rich features and used widely in most of the enterprise application with decent performance. If high thoughput is not your requirement then one can go with ActiveMQ.


This covers the concept of ActiveMQ and Apache Kafka comparison. If you have any question or you want to add anything please comment below.




Comments

Popular posts from this blog

Deploy standalone Spring MVC Application in Docker Container

Refactor Code : Separate Query from Modifier

HTTP : Must known Protocol (Part 1)