Kafka · Core Concepts

Apache Kafka vs RabbitMQ

Easykafkarabbitmqcomparisonstreamingqueues

Interview question

How does Apache Kafka differ from RabbitMQ? When would you pick each?

How to answer

The short answer

Both move messages between systems, but they solve different problems.

RabbitMQ (classic message broker / queue)

  • Messages are typically consumed and removed (or acknowledged and deleted).
  • Designed for task queues, work distribution, and complex routing (exchanges, bindings).
  • Strong focus on per-message delivery to workers.
  • Consumers usually pull work; once acked, that message is gone for that queue.

Kafka (distributed commit log / event streaming platform)

  • Messages are appended to a durable log and stay for a retention period.
  • Many independent consumers can replay the same data.
  • Built for high-throughput event streams, , clickstreams, and decoupling microservices.
  • Ordering is per ; scale comes from partitioning.

Side-by-side

DimensionKafkaRabbitMQ
Storage modelAppend-only logQueue / broker buffers
ReplayNative (offsets)Not the primary model
ThroughputVery high (partitions)Good; different sweet spot
RoutingTopics + keysExchanges, routing keys, bindings
Consumer paceIndependent per groupOften push/pull work items
OrderingPer partitionPer queue (with caveats)

When to choose what

  • Kafka: event sourcing-ish streams, analytics pipelines, CDC into a lake/warehouse, many downstream systems reading the same events.
  • RabbitMQ: background jobs, RPC-style work, complex routing, "process this once then forget."

Interview tip: Say Kafka is a durable, replayable log; RabbitMQ is a work queue / smart broker. Do not say one is "always better."