All four message brokers: ActiveMQ, Kafka, RabbitMQ, and Memphis are free, open-source, and support both producer/consumer and publisher/subscriber architectures.
However, the following are the differences between them.
ActiveMQ from Apache fully complies with the Java Messaging Service (JMS).
JMS is a specification for the job of a message broker.
With JMS, transmitted messages can be Java objects.
ActiveMQ supports a wide range of messaging protocols.
ActiveMQ, like others, uses queues to keep messages in FIFO (first-in, first-out) order.
Unlike others, Kafka gives power to message consumers.
Consumers proactively come and pull and use up messages.
When messages are produced to the broker, they are retained in topics for long or till some preset time.
In Kafka, topics are like queues.
Kafka doesn’t need to handle message acknowledgements because the consumers themselves pick the messages.
Kafka has high message persistence and low latency (or high throughput).
RabbitMQ has exchanges and queues.
Exchanges route messages to queues.
Publishers publish messages to exchanges while subscribers subscribe to queues.
Subscribers need to acknowledge messages, or else the messages will become poisoned or move to a dead-letter exchange (DLX) after a set time-to-live period.
RabbitMQ comes with well-defined routing capabilities.
Memphis has consumers, producers, and stations. Stations in Memphis are like queues in RabbitMQ or topics in Kafka.
In Memphis, producers produce messages to stations and consumers consume from these stations.
Consumers need to acknowledge messages when they are done processing them.
Otherwise, Memphis will keep emitting these messages till they pass their time-to-live and are moved to a dead-letter station (DLS).