Apache ACTIVEMQ is an open source messaging middleware developed by the Apache Software Foundation; Since ACTIVEMQ is a pure Jave program, it requires only the operating system to support the Java Virtual machine and ACTIVEMQ can execute it.
1 comparison of technical features between queue and topic
|
Topic |
Queue |
Profile |
Publish Subscribe Messaging Publish subscription message |
Point-to-Point point-to-point |
There is no status |
Topic data is not landed by default and is stateless. |
Queue data is saved as a file by default on the MQ server, such as Active MQ, which is typically stored under $amq_home\data\kr-store\data. Can also be configured as DB storage. |
Integrity Assurance |
There is no guarantee that every piece of data published by publisher will be accepted by subscriber. |
The queue guarantees that each piece of data can be received by receiver. |
Whether the message will be lost |
In general, when Publisher publishes a message to a topic, only the sub that is listening to the topic address can receive the message, and if no sub is listening, the topic is lost. |
Sender sends a message to the target Queue,receiver can receive the message on this queue asynchronously. Messages on the queue are not lost if they are not currently being picked up by receiver. |
Message Publishing Receive Policy |
A one-to-many message publishing receive policy that listens to multiple sub-topic addresses to receive messages from Publisher. Sub receives notification MQ server |
One message to the receiving policy, a sender sends a message, only one receiver receives. After receiver is received, the MQ server is notified that the MQ server has deleted or otherwise acted on the messages in the queue. |
The biggest difference between the topic and the queue is that the topic is in the form of a broadcast that notifies all online listeners that there is a new message, that the client without the listener will not receive the message, and that the queue notifies more than one client in the listening state in the form of a point-to-point.
Message Queuing Mq-apache ActiveMQ