Two Different Tools for Different Jobs

RabbitMQ and Apache Kafka are both message brokers, but they serve fundamentally different purposes. RabbitMQ is a traditional message queue focused on reliable message delivery. Kafka is a distributed event streaming platform focused on high-throughput, durable event logs. At Nexis Limited, we use both — RabbitMQ for task queues and Kafka for event streaming in Bondorix.

RabbitMQ: Traditional Message Queuing

RabbitMQ implements the AMQP protocol and excels at message routing, delivery guarantees, and task distribution. Messages are sent to exchanges, routed to queues based on routing rules, and consumed by workers. Once consumed, messages are removed from the queue.

Best For

  • Task queues — distributing work across multiple workers (background jobs, email sending).
  • Request-reply patterns — RPC-style communication between services.
  • Complex routing — topic-based, header-based, or pattern-based message routing.
  • When message ordering per-queue is sufficient and replay is not needed.

Apache Kafka: Event Streaming

Kafka stores events in durable, ordered, partitioned logs called topics. Consumers read from topics at their own pace using offsets. Events are retained for a configurable period (or indefinitely), enabling replay, multiple independent consumers, and event sourcing.

Best For

  • Event streaming — capturing and processing streams of events in real time.
  • Event sourcing — storing the complete history of state changes.
  • Log aggregation — collecting logs from multiple services into a central stream.
  • High-throughput workloads — Kafka handles millions of messages per second.
  • Multiple consumers — many services can independently consume the same event stream.

Key Architectural Differences

  • Message retention: RabbitMQ deletes messages after consumption. Kafka retains events for a configurable period.
  • Consumer model: RabbitMQ pushes messages to consumers. Kafka consumers pull messages at their own pace.
  • Ordering: RabbitMQ guarantees order within a single queue. Kafka guarantees order within a partition.
  • Replay: RabbitMQ does not support replay. Kafka consumers can reset their offset to reprocess events.
  • Throughput: Kafka is designed for much higher throughput than RabbitMQ.

Operational Considerations

RabbitMQ is simpler to operate — it runs as a single process or small cluster and has a built-in management UI. Kafka requires ZooKeeper (or KRaft in newer versions) and is more complex to deploy, configure, and monitor. For teams without Kafka operational experience, managed Kafka services (Confluent Cloud, AWS MSK) reduce operational burden significantly.

Our Production Usage

In Bondorix, we use Kafka for shipment lifecycle events — every state change (booked, dispatched, in-transit, delivered) is published to a Kafka topic. Multiple services consume these events independently: the notification service sends alerts, the analytics service updates dashboards, and the billing service triggers invoice generation. We use RabbitMQ for task queues — generating PDF documents, sending emails, and processing image uploads.

Conclusion

Choose RabbitMQ for task queuing, request-reply, and complex routing. Choose Kafka for event streaming, event sourcing, and high-throughput workloads with multiple consumers. They are not competitors — they solve different problems, and many systems use both.

Designing your messaging architecture? Our team can help you choose and implement the right solution.