Key difference between Kafka and a traditional queue like RabbitMQ?
Options
- Kafka cannot keep the messages after delivery
- Kafka is a durable log; consumers replay by offset (Correct option)
- RabbitMQ is only used for application logging
- There is no difference between the two systems
Answer
Kafka is a durable, partitioned log; consumers track offsets and can replay, and many consumer groups read the same stream
Why
RabbitMQ: a message waits in a queue until a consumer takes and acknowledges it; then it is gone. Great for distributing tasks to workers.
Kafka: messages are appended to a log that is kept for days. Each consumer remembers its position (offset), so it can re-read old messages, and many different services can read the same stream independently.
Kafka fits high-volume event streams; order is guaranteed only within a partition.
Remember
RabbitMQ = task queue. Kafka = replayable event log.