|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help in understanding Pub/sub Concepts |
« View previous topic :: View next topic » |
Author |
Message
|
ashritha |
Posted: Wed Dec 28, 2005 9:18 am Post subject: Help in understanding Pub/sub Concepts |
|
|
Voyager
Joined: 25 Jul 2005 Posts: 85
|
Hello,
I am trying to understand the pub/sub concepts in MB.
I have a flow which pulishes a message and another flow for subscribing the published messages.
When the message is published, where does it reside?
The documentation says the publication node publishes the message to the broker and the broker routes it to the subscriber, but where does the message actually stay in the broker. does it physically reside on any of the broker queues???
The subscriber flow has an input node to which i will have to send a subscriber request.
Now, to which queue should the subscriber request go and how does the request message look like?
Also, do i have to send a request for every message published on the same topic?
I was expecting that if there is a subscriber for a topic he should be receiving the published messages automatically without sending the requests everytime. But how do I achieve this?
Thanks. |
|
Back to top |
|
 |
jsware |
Posted: Tue Jan 03, 2006 5:15 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
This is what I have observed when using publish & subscribe.
For "normal" publications (I.e. they are not retained publications), the publication node puts the message directly onto the queue registered by the subscriber. If this is a remote queue, it gets put directly onto an xmitq. The broker does not "retain" the publication anywhere I am aware of. IBM may document it in terms of "the publication node publishes to the broker which then distributes it to the subscribers", but I believe this is all performed in a single unit of work within your flow.
The "list" of who has subscribed to what topics is retained by the broker in the database. This is a list of the registered subscribers (e.g. joe bloggs wants sports/football publications to be delivered to the JOE.BLOGGS.FOOTBALL.RESULTS queue).
If the publication is marked to be retained by the broker (so that a late subscriber receives a copy of the last publication for a topic) then this message is retained in the database. When a subscription registration is received, the broker can produce a publication from the retained copy in the database.
To register a subscription on behalf of a message flow, the subscription request should go to the SYSTEM.BROKER.CONTROL.QUEUE. You can use something like RFHUTIL to send a subscription registration.
MQ does not have the concept of a non-durable subscriber. This is a JMS term. From what I can gather (I'm no JMS expert), all it means is that a JMS application will automatically unsubscribe from a topic when it shuts down. For durable subscribers, MQ will continue to deliver publications while the application is not running. These publications then just queue up on the receiving queue. When the JMS application restarts, it registers the same topic/queue/user name etc. and the broker determines this is a duplicate registrations and de-dupes this, avoiding sending multiple messages to a subscriber. _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 03, 2006 5:22 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|