title: “Motivation” permalink: /docs/motivation/ modified: 2016-12-16T15:01:43-04:00

At early stages, we constructed our distributed messaging middleware based on ActiveMQ 5.x(prior to 5.3). Our multinational business uses it for asynchronous communication, search, social network activity stream, data pipeline, even in its trade processes. As our trade business throughput rises, pressure originating from our messaging cluster also becomes urgent.

{% include toc %}

Why RocketMQ ?

Based on our research, with increased queues and virtual topics in use, ActiveMQ IO module reaches a bottleneck. We tried our best to solve this problem through throttling, circuit breaker or degradation, but it did not work well. So we begin to focus on the popular messaging solution Kafka at that time. Unfortunately, Kafka can not meet our requirements especially in terms of low latency and high reliability, see here for details.

In this context, we decided to invent a new messaging engine to handle a broader set of use cases, ranging from traditional pub/sub scenarios to high volume real-time zero-loss tolerance transaction system. We believe this solution can be beneficial, so we would like to open source it to the community. Today, more than 100 companies are using the open source version of RocketMQ in their business.

The following table demonstrates the comparison between RocketMQ, ActiveMQ and Kafka (Apache's most popular messaging solutions according to awesome-java):

RocketMQ vs. ActiveMQ vs. Kafka

Please note this documentation is written by the RocketMQ team. Although the ideal is a disinterested comparison of technology and features, the authors’ expertise and biases obviously favor RocketMQ.

The table below is a handy quick reference for spotting the differences among RocketMQ and its most popular alternatives at a glance.

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 kahadb 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