Skip to main content
Version: 4.x

Why choose RocketMQ

Why RocketMQ

During Ali's nascent days of RocketMQ, we used it for asynchronous communications, search, social networking activity flows, data pipelines, and trade processes. As our trade business throughput rose, the pressure originating from our messaging cluster became urgent.

According to our research, the ActiveMQ IO module reached a bottleneck as queue and virtual topic usage increased. We tried our best to solve this problem by throttling, circuit breaker or downgrading, but the results were not satisfactory. So we tried the popular messaging solution Kafka. unfortunately, Kafka could not meet our requirements, especially in terms of low latency and high reliability, as detailed here. In this case, we decided to invent a new messaging engine to handle a wider range of messaging use cases, covering from traditional pub/sub scenarios to high-volume, real-time, zero-error transaction systems.

Since its inception, Apache RocketMQ has been widely adopted by many enterprise developers and cloud vendors for its simple architecture, rich business functionality, and extreme scalability. After more than ten years of large-scale scenario polishing, RocketMQ has become the industry consensus as the preferred solution for financial-grade reliable business messages, and is widely used in business scenarios in Internet, big data, mobile Internet, IoT and other fields.

tip

The following table shows the comparison between RocketMQ, ActiveMQ and Kafka

RocketMQ vs. ActiveMQ vs. Kafka

Messaging ProductClient SDKProtocol and SpecificationOrdered MessageScheduled MessageBatched MessageBroadCast MessageMessage FilterServer Triggered RedeliveryMessage StorageMessage RetroactiveMessage PriorityHigh Availability and FailoverMessage TrackConfigurationManagement and Operation Tools
ActiveMQJava, .NET, C++ etc.Push model, support OpenWire, STOMP, AMQP, MQTT, JMSExclusive Consumer or Exclusive Queues can ensure orderingSupportedNot SupportedSupportedSupportedNot SupportedSupports very fast persistence using JDBC along with a high performance journal,such as levelDB, kahaDBSupportedSupportedSupported, depending on storage,if using levelDB it requires a ZooKeeper serverNot SupportedThe default configuration is low level, user need to optimize the configuration parametersSupported
KafkaJava, Scala etc.Pull model, support TCPEnsure ordering of messages within a partitionNot SupportedSupported, with async producerNot SupportedSupported, you can use Kafka Streams to filter messagesNot SupportedHigh performance file storageSupported offset indicateNot SupportedSupported, requires a ZooKeeper serverNot SupportedKafka uses key-value pairs format for configuration. These values can be supplied either from a file or programmatically.Supported, use terminal command to expose core metrics
RocketMQJava, C++, GoPull model, support TCP, JMS, OpenMessagingEnsure strict ordering of messages,and can scale out gracefullySupportedSupported, with sync mode to avoid message lossSupportedSupported, property filter expressions based on SQL92SupportedHigh performance and low latency file storageSupported timestamp and offset two indicatesNot SupportedSupported, Master-Slave model, without another kitSupportedWork out of box,user only need to pay attention to a few configurationsSupported, rich web and terminal command to expose core metrics