Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveMQ vs Apollo vs Kafka

I don't have any previous experience with *MQs and I'm looking to build knowledge on JMS and message queues in general. That way, I wonder whether I should start with ActiveMQ or just "ignore" it altogether and start by teaching myself Apollo. Is Apollo as feature-complete as ActiveMQ? Does it implement JMS 2.0 (I see that ActiveMQ got stuck with 1.1)? Will I be missing something really important?

Also, how does Kafka compare to these two solutions?

like image 458
Martin Avatar asked Dec 27 '14 11:12

Martin


People also ask

Is Kafka better than ActiveMQ?

Kafka is way faster than ActiveMQ. It can handle millions of messages per sec. ActiveMQ supports both message queues and publishes/subscribe messaging systems. On the other hand, Kafka is based on publish/subscribe but does have certain advantages of message-queues.

How is Kafka different from ActiveMQ?

One key difference is that Kafka allows you to find messages based on their offset (similar to consuming records from a database), whereas ActiveMQ does not. Kafka also supports more advanced features such as access control using ACLs and compression using compression codecs.

Why Kafka is better than JMS?

Kafka is a distributed streaming platform that offers high horizontal scalability. Also, it provides high throughput and that's why it's used for real-time data processing. JMS is a general-purpose messaging solution that supports various messaging protocols. Kafka is way faster than JMS.

Is AMQ Kafka?

The Red Hat® AMQ streams component is a massively scalable, distributed, and high-performance data streaming platform based on the Apache Kafka project. It offers a distributed backbone that allows microservices and other applications to share data with high throughput and low latency.


2 Answers

Apache ActiveMQ is a great workhorse full of features and nice stuff. It's not the fastest MQ software around but fast enough for most use cases. Among features are flexible clustring, fail-over, integrations with different application servers, security etc.

Apache Apollo is an attempt to write a new core for ActiveMQ to cope with a large amount of clients and messages. It does not have all nice and convenient feature of ActiveMQ but scales a lot better. Apache Apollo is a really fast MQ implementation when you give it a large multi-core server and thousands of concurrent connections. It has a nice, simple UI, but is not a "one-size-fits-all" solution.

It seems that there is an attempt ongoing to merge a number of ActiveMQ features with HornetQ under the name ActiveMQ Artemis. HornetQ has JMS2.0 support, so my humble guess is that it's likely to appear in ActiveMQ 6.x.

JIRA, Github

Kafka is a different beast. It's a very simple message broker intended to scale persistent publish subscribe (topics) as fast as possible over multiple servers. For small-medium sized deployments, Kafka is probably not the best option. It also has it's way to do things to achieve the high throughput, so you have to trade a lot in terms of flexibility to get high distributed throughput. If you are new to the area of MQ and brokers, I guess Kafka is overkill. On the other hand - if you have a decent sized server cluster and wonder how to push as many messages as possible through it - give Kafka a spin!

like image 156
Petter Nordlander Avatar answered Sep 18 '22 13:09

Petter Nordlander


This is an older question but I'll provide a more modern answer here.

  • The Apollo project is unofficially dead and they suggest Artemis is the new hotness. (link) The (seemingly) stalled development of Apollo does not give me confidence in Artemis's future.
  • My experience is similar to Petter's answer in that ActiveMQ is feature rich and capable. However, it seems as if every release fixes random crashes and memory leaks and this does not inspire confidence. It's stable for my project (which uses clustering) but we have seen weird behavior and crashes in the broker over the last dozen or so releases (currently using 5.14.3)
  • I have not used RabbitMQ (my current project is committed to ActiveMQ) but I will be trying it out on the next project that needs a messaging bus. Not having the kitchen sink of features to support will hopefully mean it is more stable.

EDIT: The 2.3.0 Apache Artemis release happened ~Sept 5 2017. So it does seem to be progressing as of now. But (link) changelog still seems too scary.

like image 37
Matthew B. Avatar answered Sep 20 '22 13:09

Matthew B.