JMS message transfer mechanism

Source: Internet
Author: User

JMS Message Delivery model :

  The messaging mechanism is based on pull or poll (polling) .

There are two " messaging models " for JMS: Peer and pub/sub.

(1) Peer: Point-to-point messaging model that allows JMS clients to synchronize or asynchronously send messages through the queue (queues) virtual channel ; The producer of the message is Sender and the consumer is receiver.

     Receiver actively requests the message to the queue , not the JMS provider pushing the message to the client ;

The main reason is that a queue channel may have multiplereceiver,eachreceivermay have different processing rates for messages(different blocking times caused by processing messages),forJMSby the provider,it doesn't realize whichreceiverin"Idle"Status,ifJMSa provider's proactive push can cause a blockage of the channel or a backlog of messages on the client.;so based on the client Pullthe way,whenreceiverIdle time toJMSProvider Request Message,It's a good solution to this problem.,and it's good to be able to"Load Balancing".

if a message in the Queue is successfully received by a recervier ( confirmed success ) , the message is removed .

Peer Messaging mode supports asynchronous " out-of-the-box " and synchronous " request / reply ".

(2) Pub/sub: In the publish /subscribe model , messages are published to a virtual channel named Subject (Topic) , the producer of the message is Publisher, the consumer is Subscriber, published to messages in the Topic can be received simultaneously by multiple clients .

Pub/subMessage delivery model is based on push(push), JMSthe provider proactively pushes messages to and from the client,similar to broadcasting;the reason for this approach,It's really good to understand.,since each client should receive a message,Then forJMSby the provider,only need to traverse all the"Active"the link,send the message out in turn,Without the client"Futile"The Go polling.

Inpub/subinside the Model,There are many different types of subscribers;Non-persistent subscribers are temporary subscribers,They are only actively listening to the topic to receive messages;Persistent Subscribers will receive every message that is published,even if its link is in the"Offline".In addition, there are"Dynamic Persistent Subscribers"and the"Managed Persistent Subscribers". 

Jms The provider supports " message "   any sent to JMS ,   Will first be persisted ( for non-persisted types of data , is based on   This kind of effective guarantee strategy (" Save and forward   effectively ensures the security of the message

JMS message transport mechanism

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.