Differences between topics and queue of JSM

Source: Internet
Author: User

InJMS(Java Message Service)Topic implementationPublish and subscribeSemantics. When a message is publish, it will be sent to all interested subscribers, so there are no more than oneSubscriber(The computer vocabulary is interpreted as"User")A copy of the received message. However, when the message proxy receives a message, only the subscribed subscriber can get a copy of the message.

JMS queueRunLoad balancerSemantics. A message can only beConsumerYes. If no consumer is available when the message is sent, it will be saved until the consumer that can process the message is available. If a consumer receives a message but does not respond to it, the message is forwarded to another consumer. A single queue can have many consumers and load balancing among multiple available consumers

Two message transmission methods in the JMS SpecificationTopic and queue, The comparison between the two is as follows ():

 

Message confirmation methods:Three types:

Auto_acknowledge(Automatic notification)

Client_acknowledge(The client determines the notification time.)

Dups_ OK _acknowledge(Latency // batch notification)

If you are usingThe client determines the notification time.InMessagelistenerLiExplicit callMessage. Acknowledge ()To notify the server. The server takes corresponding actions after receiving the notification.

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.