1. Compliance with JMS specifications
MQ complies with the JMS specification and Kafka does not follow the JMS specification. Kafka uses file systems to manage the lifecycle of messages
2. Throughput
Kafka is a sequential write disk, so the efficiency is very high. Kafka deletes messages based on time or partition size, while broker is stateless, consumer consumption status (offset) is controlled by consumer itself (each consumer instance consumes only one or more specific partition data, and one partition is consumed by a particular consumer instance), There is also no need for broker to control the consumption of messages through the lock mechanism, so the throughput is staggering, which is also a Kafka attractive place.
Kafka support for high throughput, even on very inexpensive commercial machines can also do a single support per second 100K message transmission.
MQ throughput is different, but there is a certain gap with the Kafka ratio.
3. Compressive resistance
Kafka still maintains an O (1) way of providing message persistence in large amounts of data, even for terabytes of data that guarantees constant-time complexity of access performance. MQ, in turn, has a performance degradation.
4. Support for off-line data processing and real-time data processing
Kafka also supports off-line data processing and real-time data processing.
5. Extensibility Comparisons
Kafka Support Online Horizontal scaling
6. Message Security
Kafka can guarantee the security of messages in most cases. When the message counts as a commit, it will be exposed to consumer and ensure the at-least-once delivery principle.
7. Usability, stability and fault tolerance
Kafka Natural support Ha,leader hang up, follower automatically elect a new leader.
8.