Kafka and RabbitMQ both move messages between systems, but they are optimized for different styles of work.
Kafka
Kafka is best thought of as a durable append-only log.
It is a good fit when you want:
- Event streaming
- Durable history
- Replayable consumption
- High-throughput pipelines
- Multiple consumers reading the same data at their own pace
RabbitMQ
RabbitMQ is best thought of as a queue and routing broker.
It is a good fit when you want:
- Work queues
- Task dispatch
- Flexible routing with exchanges and bindings
- Explicit queue semantics
- Retry and Dead Letter Queue handling around jobs
Compare
- Kafka emphasizes ordered log storage and consumer offsets
- RabbitMQ emphasizes queues, exchanges, and message routing
- Kafka is often chosen for event streaming and replay
- RabbitMQ is often chosen for job queues and asynchronous work distribution
Rule of thumb
Use Kafka when the history of events matters.
Use RabbitMQ when individual tasks should be delivered and handled with queue semantics.
Both belong under Messaging, but they solve different problems.