DEV Community

Cover image for Apache Kafka - Fundamentals, Use cases and Trade-Offs

Apache Kafka - Fundamentals, Use cases and Trade-Offs

Dhruvesh Patel on October 24, 2020

This post will focus on open source and popular Apache kafka platform related brief fundamentals, Use Cases and Trade-offs with other popular messa...
Collapse
 
ziggo profile image
Giuseppe

Please, can you explain better when to use Kafka instead of Rabbit MQ? I haven't really understand, you said that Kafka is used for log storage, but in the official tutorial of RabbitMQ there is also an example about log storage. What are the differences?

Collapse
 
dhruvesh_patel profile image
Dhruvesh Patel

Kafka uses a distributed commit log as its storage layer. Writes are appended to the end of the log and Reads are sequential starting from an offset. This suites best for event streaming use cases.

Conversely, RabbitMQ uses index-based storage systems. These keep data in a tree structure to provide the fast access necessary for acknowledging individual messages, but fast individual reads comes at the cost of write overhead, which leads to either decreased write throughput and increased write latency compared to a log.

RabbitMQ is designed to store messages for a short period of time only. Kafka can retain messages indefinitely.

Hope this helps.

Collapse
 
shreya1310 profile image
Shreya1310

Very helpful article 👍

Collapse
 
dhruvesh_patel profile image
Dhruvesh Patel

Thanks for kind words.

Collapse
 
levirs565 profile image
Levi Rizki Saputra

Good explanation.👍

Collapse
 
dhruvesh_patel profile image
Dhruvesh Patel

Thanks for the feedback.

Collapse
 
prabhat36539454 profile image
Prabhat Kumar

Always a great learning to go through your article.

Collapse
 
dhruvesh_patel profile image
Dhruvesh Patel

Glad to help.

Collapse
 
chiragks profile image
Chirag Shah

Nice article . Always enjoyed your post. Keep share like this.

Collapse
 
dhruvesh_patel profile image
Dhruvesh Patel

Thanks for kind words.