Search code examples
rabbitmqapache-kafkamessagebrokerspring-rabbitspring-cloud-stream

Pros and Cons of Kafka vs Rabbit MQ


Kafka and RabbitMQ are well known message brokers. I want to build a microservice with Spring Boot and it seems that Spring Cloud provides out of the box solutions for them as the defacto choices. I know a bit of the trayectory of RabbitMQ which has lot of support. Kafka belongs to Apache so it should be good. So whats the main goal difference between RabbitMQ and Kafka? Take in consideration this will be used with Spring Cloud. Please share your experiences and criteria. Thanks in advance.


Solution

  • Three application level difference is:

    1. Kafka supports re-read of consumed messages while rabbitMQ not.

    2. Kafka supports ordering of messages in partition while rabbitMQ supports it with some constraint such as one exchange routing to the queue,one queue, one consumer to queue.

    3. Kafka is for fast in publishing data to partition than rabbitMQ.