Apache Kafka differences from JMS
There are many subtle differences between Apache Kafka and JMS.
1. Order of Messages
Kafka ensures that the messages are received in the order in which they were sent at the partition level. JMS does not have any such contracts.
Kafka does not have any concept of filters at the brokers that can ensure – messages that are being picked up by a consumer matches some criteria. The filtering has to happen at the consumers (or applications).
In the case of JMS – if your messaging application needs to filter the messages it receives, you can use a JMS API message selector, which allows a message consumer to specify the messages it is interested in. Message selectors assign the work of filtering messages to the JMS provider rather than to the application.
3. Persistence of Messages
Kafka brokers store the messages for a specified period of time irrespective of whether the message has been picked up by the consumers or not.
JMS providers typically provide either in memory or disk based storage of messages.
4. Push vs Pull of Messages
In JMS, the provider can push the JMS message to topics and queues.
In Kafka, consumers pull the message from the broker.