17‑Point Comparison: Kafka vs RabbitMQ vs ZeroMQ vs RocketMQ vs ActiveMQ
This article provides a comprehensive 17‑point comparison of five popular message queue systems—Kafka, RabbitMQ, ZeroMQ, RocketMQ, and ActiveMQ—covering documentation, supported languages, protocols, storage, transactions, load balancing, clustering, management UI, availability, message duplication, throughput, subscription models, ordering, acknowledgments, replay, retries, concurrency, and more.
Below is a detailed 17‑point comparison of Kafka, RabbitMQ, ZeroMQ, RocketMQ, and ActiveMQ when used as message‑queue solutions.
1. Documentation
Kafka: moderate. Official book by the author and some online resources. RabbitMQ: abundant. Several good books and many online materials. ZeroMQ: scarce. No dedicated book; most resources are code examples and brief introductions. RocketMQ: scarce. No dedicated book; official docs are concise, but technical details are limited. ActiveMQ: abundant. No dedicated book, but many online resources.
2. Programming Languages
Kafka: Scala RabbitMQ: Erlang ZeroMQ: C RocketMQ: Java ActiveMQ: Java
3. Supported Protocols
Kafka: proprietary protocol based on TCP RabbitMQ: AMQP ZeroMQ: TCP, UDP RocketMQ: proprietary protocol ActiveMQ: OpenWire, STOMP, REST, XMPP, AMQP
4. Message Storage
Kafka: memory, disk, database; supports massive accumulation. The smallest storage unit is a partition; topics contain multiple partitions distributed across brokers for load balancing and high availability. RabbitMQ: memory, disk; supports limited accumulation. Supports persistent and non‑persistent messages, with optional in‑memory backup for persistent messages. ZeroMQ: stored in sender’s memory or disk; no persistence. RocketMQ: disk; supports large accumulation. Uses CommitLog for data and ConsumeQueue as an index, enabling sequential writes and high write performance. ActiveMQ: memory, disk, database; supports limited accumulation.
5. Message Transactions
Kafka: supported RabbitMQ: supported (client channel set to transaction mode) ZeroMQ: not supported RocketMQ: supported ActiveMQ: supported
6. Load Balancing
Kafka: supports load balancing via partition leaders distributed across brokers; consumers in a group share partitions evenly; automatic rebalancing occurs when consumers join or leave. RabbitMQ: limited support; routing determined by exchange and routing key; clustering can use HAProxy or LVS for client‑side balancing. ZeroMQ: decentralized; does not support load balancing. RocketMQ: supports load balancing; consumer count should not exceed queue count; similar to Kafka’s strategy. ActiveMQ: supports load balancing, can be implemented with ZooKeeper.
7. Clustering Model
Kafka: native leader‑slave stateless cluster; each broker can be both master and slave; relies on ZooKeeper for dynamic scaling. RabbitMQ: simple clustering with replication mode; advanced clustering less supported. ZeroMQ: decentralized; no clustering support. RocketMQ: typical master‑slave mode; name server is a lightweight stateless node; brokers register topics with name servers. ActiveMQ: simple master‑slave clustering; advanced clustering less supported.
8. Management UI
Kafka: average RabbitMQ: good ZeroMQ: none RocketMQ: none ActiveMQ: average
9. Availability
Kafka: very high (distributed) RabbitMQ: high (master‑slave) ZeroMQ: high RocketMQ: very high (distributed) ActiveMQ: high (master‑slave)
10. Message Duplication Guarantees
Kafka: at‑least‑once, at‑most‑once RabbitMQ: at‑least‑once, at‑most‑once ZeroMQ: no persistence; neither at‑least‑once nor at‑most‑once RocketMQ: at‑least‑once ActiveMQ: at‑least‑once
11. Throughput (TPS)
Kafka: very high (batch send/consume) RabbitMQ: relatively high ZeroMQ: very high RocketMQ: high (batch consume possible) ActiveMQ: relatively high
12. Subscription Model & Message Distribution
Kafka: topic‑based publish/subscribe with optional regex matching. RabbitMQ: four exchange types – direct, topic, headers, fanout. ZeroMQ: point‑to‑point (p2p). RocketMQ: topic/messageTag based publish/subscribe with regex matching. ActiveMQ: point‑to‑point and publish/subscribe modes.
13. Ordered Messages
Kafka: supported (order guaranteed per partition). RabbitMQ: not supported. ZeroMQ: not supported. RocketMQ: supported. ActiveMQ: not supported.
14. Message Acknowledgment
Kafka: supports producer acks (0, 1, all) and consumer offset commits. RabbitMQ: supports acknowledgments (autoAck true/false) and batch/async confirms. ZeroMQ: supported. RocketMQ: supported. ActiveMQ: supported.
15. Message Replay
Kafka: supports offset‑based replay. RabbitMQ: not supported. ZeroMQ: not supported. RocketMQ: supports time‑point replay. ActiveMQ: not supported.
16. Message Retry
Kafka: not built‑in but can be implemented via offset replay. RabbitMQ: not built‑in but can be achieved using manual acknowledgments. ZeroMQ: not supported. RocketMQ: built‑in retry with configurable intervals. ActiveMQ: not supported.
17. Concurrency
Kafka: high; each consumer runs in its own thread; consumer count limited by partition count. RabbitMQ: very high; Erlang‑based, can create multiple channels per connection. ZeroMQ: high. RocketMQ: high; similar consumer‑thread model as Kafka. ActiveMQ: high; can handle tens of thousands of messages per second per broker.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
