DEV Community

Discussion on: Apache Kafka - Fundamentals, Use cases and Trade-Offs

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.