mq-transmission mode topic vs. queue

Source: Internet
Author: User
Tags publish subscribe

The two message transmission modes in the JMS specification are topic and queue, which are compared in the following table ():

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.

mq-transmission mode topic vs. queue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.