Kafka vs RocketMQ vs RabbitMQ: The Design Trade-offs Behind the Benchmark Numbers
Broker selection mistakes surface during peak traffic as lost orders, blocked queues, and all-night pager rotations. This breakdown ties each broker's internal design to the failure modes that actually break production systems, so teams can pick and configure with the right trade-offs in mind.
Choosing a message broker by memorizing throughput numbers misses the point. Each of the three major brokers embodies a different message semantic: Kafka is a distributed event log tuned for data flow, RocketMQ is a business message middleware built around transactions and reliability, and RabbitMQ is a flexible routing agent with microsecond latency but weak backlog tolerance. The article argues that the right question is whether a lost message costs money — if yes, use RocketMQ; if it's just logs, use Kafka; if you need fancy routing on light traffic, RabbitMQ is fine.
The breakdown digs into architecture: Kafka's speed comes from sequential disk writes, page cache, batching, and zero-copy sendfile, but those optimizations degrade with TLS, format conversion, or too many partitions. RocketMQ's CommitLog plus ConsumeQueue design gives it Kafka-like write speed while supporting massive business topic counts and billion-level backlogs. RabbitMQ's in-memory queues make it fast at low volume but dangerous under pressure. The article then walks through transactional messages (RocketMQ's half-message and callback check), delayed messages (Queue head-of-line blocking in RabbitMQ, native support in RocketMQ, DIY in Kafka), ordering (local order by key, never global), message loss defense across producer, broker, and consumer, idempotency on the consumer side, and backlog emergency procedures.
Real incident details anchor the advice: a peak of 80k TPS caused RabbitMQ to pile up 3 million messages and crash the consumer; moving the order pipeline to RocketMQ handled the peak with zero loss. The author's team uses RocketMQ for transactions, RabbitMQ for notifications, and Kafka for logs and data lake ingestion.
The 'does a lost message cost money' heuristic is a practical filter, but it doesn't capture latency-sensitive or routing-heavy workloads where RabbitMQ still wins despite its reliability gaps.
RocketMQ's long-polling pull (holding a request for up to 15 seconds) is a clever middle ground that most Western developers overlook, since Kafka's pure pull and RabbitMQ's push both have obvious downsides.
The article's emphasis on monitoring consumer lag instead of TPS is a common blind spot; teams often report healthy TPS while a dead-letter topic silently grows.
Kafka's deliberate omission of delayed messages and business transaction messages reinforces that it's optimized for data pipelines, not business semantics; teams forcing Kafka into transaction roles end up building fragile compensations.