Author |
Message
|
sachin15 |
Posted: Sun Jul 01, 2007 6:25 pm Post subject: WMQ Pub/Sub - Where the Publish messages store in Broker |
|
|
Novice
Joined: 24 Nov 2006 Posts: 13
|
Hi,
When you publish a message to a topic, it stores somewhere in the broker's queue right ? Do you know this queue name?
my question is where I can see the published messages in mq queue when the subscriber application is down ?
Thanks
Sachin |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 01, 2007 8:00 pm Post subject: Re: WMQ Pub/Sub - Where the Publish messages store in Broker |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sachin15 wrote: |
Hi,
When you publish a message to a topic, it stores somewhere in the broker's queue right ? Do you know this queue name?
my question is where I can see the published messages in mq queue when the subscriber application is down ?
Thanks
Sachin |
When you define a persistent topic subscription you should as well define the target queue for that subscription. This is where the messages will be delivered to.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sachin15 |
Posted: Sun Jul 01, 2007 8:13 pm Post subject: |
|
|
Novice
Joined: 24 Nov 2006 Posts: 13
|
But we always specify only the topic name when we publish messages. I have never seen in any document specifying the user defined queue along with the topic name. Please explain !!! |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 02, 2007 12:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sachin15 wrote: |
I have never seen in any document specifying the user defined queue along with the topic name. Please explain !!! |
From the WMB v6 manual Publish/Subscribe, in the section "Developing publish/subscribe applications - Publish/Subscribe - Subscribers" (top of page 28 in my copy):
Quote: |
The subscriber sends a subscription request to a broker, specifying which publications it wants to receive. The request defines the topic, the filter, and the subscription point of each publication, and also specifies the name of a queue to which the publications should be sent. This queue is known as the subscriber queue. |
(The underline is mine)
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 02, 2007 1:43 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Sachin,
My understanding of ur question...
u hv a subscription registered on some topic and notifications have been published on them in past.. and now ur MQ application (receiver) goes down.... How to see the messages being published on this topic now??
Is that what ur question is..
if yes then
the message ll go to dead letter queue of ur receiving queue manager...
last msg can be viewed only in case the retain publication is on....
let me know if you meant otherwise _________________ Cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 02, 2007 3:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Akanksha wrote: |
Sachin,
My understanding of ur question...
u hv a subscription registered on some topic and notifications have been published on them in past.. and now ur MQ application (receiver) goes down.... How to see the messages being published on this topic now??
Is that what ur question is..
if yes then
the message ll go to dead letter queue of ur receiving queue manager...
last msg can be viewed only in case the retain publication is on....
let me know if you meant otherwise |
Why should the message go to the DLQ? This will only happen in specific circumstances: if the subscription queue was dynamic and the subscription was not for persistent messages and the subscription was durable or the client crashed...
If the client for a non durable subscription closes, I believe the broker is notified and the subscription removed... (check the manual to be sure).
If the client of a durable subscription closes the messages just pile up in the subscription queue...
IMHO you should always, as I would, handle subscription registration and cancellation (deregistration) explicitely via the required control messages...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rajmq |
Posted: Mon Jul 02, 2007 3:26 am Post subject: |
|
|
 Partisan
Joined: 29 Sep 2002 Posts: 331 Location: USA
|
Sachin,
Noramlly broker doesn't store the message and try to send the message to coresponding subscriber.
If subscriber is not available then the message will be discarded.
Hope this will help you..
 |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 02, 2007 3:27 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
hey fjp_saper,
hmm.. me confused now...
a normal subscription registered and then the subscriber queue got deleted.. .in ds case my notifications ll go to DLQ
now if teh queue is on another qmn which is down thn d msgs ll stay in transmission queue.. _________________ Cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 02, 2007 3:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Akanksha wrote: |
hey fjp_saper,
hmm.. me confused now...
a normal subscription registered and then the subscriber queue got deleted.. .in ds case my notifications ll go to DLQ
now if teh queue is on another qmn which is down thn d msgs ll stay in transmission queue.. |
As I said: specific circumstances = subscriber queue deleted for a durable subscription would qualify don't you think?
Xmitq isn't that normal behavior when the target qmgr is unavailable??
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 02, 2007 3:38 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 02, 2007 3:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The concept is Pub/Sub regardless of base MQ or JMS.
By the way you always need the RFH header in Pub/Sub whether your client is MQ or JMS... That's why some people use XMS for pub/sub.... _________________ MQ & Broker admin |
|
Back to top |
|
 |
wbi_telecom |
Posted: Mon Jul 02, 2007 1:12 pm Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
Sachin15,
Can you share how your subscription request message looks like and what are the RegOpts you use when you send it to the broker? That will tell you if your subscription will be persistent and will also tell you the queue name where to find it.
Cheers, |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 02, 2007 3:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Note that if you use JMS the subscription queue is in the Topic Object.
See how by creating a file context, defining a topic.
If you then print the topic you get the uri form:
"topic://mytopic/mysubtopic?brokerDurSubQueue=SYSTEM.JMS.D.MYALIAS&brokerVersion=1"
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|