Author |
Message
|
kun.leeing |
Posted: Mon Apr 13, 2009 12:10 am Post subject: Report Msg in Pub/Sub |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Hi, experts.
I test report message in pub/sub.
I published a message with COD option and 'replyto' settings and expected getting report message as it was retrived.
But why can I also get a message with COD when I dont open any subscribers.
And If there's no subscriber opened , the persistent msg published will be put into deadletter queue? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 13, 2009 12:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
My advice is to sit down with the documentation and re-read the section on pub/sub; because I don't know where to start with your misunderstandings on it!
Aside from why you're want report messages in this topology? There's fairly dubious in a point-to-point system, but in a pub/sub? Why would you want to? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue Apr 14, 2009 6:23 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Because my app structure is asterisk, several sub MQ servers're connected with center mq so I use pub/sub and set Broker Topology.
I have to insure every msg retrieved and processed or retry.
So I wonder if I need report messages to give a reply because of our poor network quality.
But How can I use properly report msg on pub/sub and what is the correct method for this want?
Could experts give me a method to insure message delivery?
Thanks, everybody. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 14, 2009 7:24 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to make your message persistent. This way you have guaranteed delivery. You need to also ensure that the publication went through ok.
The pub/sub engine provides an acknowledgement of the publication in form of a "psr" message (see RFHUtil) WHEN the pub message provides a replyto destination. The "psr" message is then sent to this replyto destination and can be checked for the return code from the pub engine...
If you need delivery whether or not the subscriber is present, you need to make a durable subscription. Those are best made with their own queue for delivery.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kun.leeing |
Posted: Wed Apr 15, 2009 12:52 am Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks for responses.
I set
Quote: |
message.setJMSReplyTo(myreplytoDestination); |
.
And I want to test this acknowledgement for message sent.
So I set session by client_acknowledge or auto_acknowledge. But I get nothing in myreplytoDestination after publishing a msg.
How can I touch the "psr" ? This's one.
And second is
How can I get reply messages sent by subscriber?
I set JMSReplyto and StringProperty("JMS_IBM_Report_COD") previously and expect to get COD messages when every subscriber process this pub msg.
But Why can I get its COD message after every publication even though I do not run any subscriber? Broker send this COD?
I wonder if I can use publication's 'myreplytoDestination' to create connection and session to reply a message for the publication?
But Is this will share the svrchannel on pub point? Is this will occupy some connection number?
If so, Is there any way(proper way) to solve my problem that subscribers give me a sign.?
Thanks,experts!
Lee |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Wed Apr 15, 2009 1:09 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
kun.leeing wrote: |
I have to insure every msg retrieved and processed or retry.
|
This doesnt sound like the responsibility of the publisher. Have you considered using some sort of monitoring to alert on your MQ environment (eg channels being stopped / messages moving to backout queues or stacking up on an input Queue?)
kun.leeing wrote: |
Could experts give me a method to insure message delivery?
|
Use the assured delivery offered by MQ and make your messages persistent as suggested by fjb_saper. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Apr 15, 2009 6:04 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
The point of Pub Sub is that the publisher does not know or care if there are any subscribers.
COA and COD reports - if you get one back, you know your message made it. If you didn't get the report......did your message not make it? Or did the message make it but the report message had a problem coming back, giving you a false negative? Don't use them.
If you sent a pub message to the Broker, and asked for a COD, the pub message was delivered to the Broker, so the QM (not Broker) sends you back a COD saying the pub message made it to where you sent it. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 15, 2009 2:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
So I set session by client_acknowledge or auto_acknowledge. But I get nothing in myreplytoDestination after publishing a msg.
How can I touch the "psr" ? This's one. |
Don't know if the MQ broker will do it? We use WMB.
But try following.
Using RFHUtil create a publication message. Make it a request type and populate the reply to qmgr and replyto queue. Send the message to the broker and check if you get a reply...
I know that we get the reply for the subscription message letting us know that the subscription was successful. I thought I saw one saying that the publication was successful too...when doing a publish. Of course it will say nothing about whether the subscribers got the message or not. Those are decoupled from the publisher....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kun.leeing |
Posted: Thu Apr 16, 2009 8:20 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks,experts.
If I make messages persistent, I don't need to worry about delivery problem?
And does it mean the 'pcr' message is existed but mq explorer can not browse it?
Does it insure the message delivery after pushing message to broker errorless on broker networks?
... |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 16, 2009 8:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kun.leeing wrote: |
Thanks,experts.
If I make messages persistent, I don't need to worry about delivery problem?
And does it mean the 'pcr' message is existed but mq explorer can not browse it?
Does it insure the message delivery after pushing message to broker errorless on broker networks?
... |
If the publication is marked as persistent and the subscription is marked as persistent and durable, you should have assured delivery.
However you need to make sure on the publisher side that the message did effectively get published and did not have a problem... This is why I was suggesting to ask for the pcr response message and inspect it.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|