ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Monitoring for COD or COA

Post new topic  Reply to topic
 Monitoring for COD or COA « View previous topic :: View next topic » 
Author Message
koushikt
PostPosted: Tue Feb 03, 2015 1:10 pm    Post subject: Monitoring for COD or COA Reply with quote

Novice

Joined: 26 Jan 2015
Posts: 14

I am writing a new publisher which is going to need a confirmation on arrival/delivery of the message. I have the option set up and I also have set the ReplyToQ.
How do I monitor for these Reports? Do I need to have a separate thread which is actively listening on this queue?
Another thing I found is, if I don't have a COD_WITH_DATA all I get is a blank message to the queue when a message is delivered. So, I have no Idea to figure which message got missed/delivered with this.
Am I missing something?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 03, 2015 1:16 pm    Post subject: Re: Monitoring for COD or COA Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

koushikt wrote:
I am writing a new publisher which is going to need a confirmation on arrival/delivery of the message. I have the option set up and I also have set the ReplyToQ.
How do I monitor for these Reports? Do I need to have a separate thread which is actively listening on this queue?

COA and COD are report options specified in the MQMD of the request message. Your app needs to MQGET the COA and COD report messages from the reply-to-queue.
koushikt wrote:
Another thing I found is, if I don't have a COD_WITH_DATA all I get is a blank message to the queue when a message is delivered. So, I have no Idea to figure which message got missed/delivered with this.
Am I missing something?

Yes, report messages, like COA and COD, will have the CorrelId that matches the MsgId of the request message. You/your app will need to match use the CorrelId field to understand which request message (MsgId) caused the COA/COD report messages to be returned to your app.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Feb 03, 2015 2:15 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Quote:
I am writing a new publisher which is going to need a confirmation on arrival/delivery of the message.

What is your business requirement for confirmation? In most cases, COA and COD are not worth the hassle and create extra message traffic. Trust MQ to deliver the message.

The Report message feature is rarely, as it provides no information on what the consuming app did with the message. Trust MQ to deliver the message. If a consumer app gets it, request it to generate a reply message containing something meaningful, if that is what you desire.
_________________
Glenn
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 03, 2015 2:23 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

gbaddeley wrote:
Quote:
I am writing a new publisher which is going to need a confirmation on arrival/delivery of the message.

What is your business requirement for confirmation? In most cases, COA and COD are not worth the hassle and create extra message traffic. Trust MQ to deliver the message.

The Report message feature is rarely [used], as it provides no information on what the consuming app did with the message. Trust MQ to deliver the message. If a consumer app gets it, request it to generate a reply message containing something meaningful, if that is what you desire.


COD doesn't tell you that the intended app consumed the message - only that it was consumed by some app.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue Feb 03, 2015 3:43 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

If you get the COD, you know some app picked it up. If you don't get the COD, well, maybe the original app message was delivered but the COD message was not able to make it all the way back to the reply queue.

And so where does that leave you. When you don't get a COD, you are left wondering what happened.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
koushikt
PostPosted: Tue Feb 03, 2015 4:18 pm    Post subject: Reply with quote

Novice

Joined: 26 Jan 2015
Posts: 14

Ah. Okay I get it.
But anyways, I will have to implement this like a first line of defense when someone complains.
What I found was my report messages CorrelId had garbage value. Even though I set a MsgId in my MQPUT. I receive garbage for CorrelId when I do a MQGET on my ReplyToQ.

The CorrelId is garbage for my actual message queue too. Is there any setting I need to set in code for making the MsgIds and CorrelIds available for access?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 03, 2015 5:45 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Both MsgId and CorrelId fields are 24-byte fields - not character fields or numeric.

How exactly does the requesting application set MsgId at the MQPUT?

Does the replying application set the reply message CorrelId = request message MsgId?

How do you know that it's garbage? What utility are you using to look at it?

Please copy/paste the request message MsgId and reply message CorrelId here.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
koushikt
PostPosted: Tue Feb 03, 2015 5:58 pm    Post subject: Reply with quote

Novice

Joined: 26 Jan 2015
Posts: 14

I was initially reading it as a string. Hence the gibberish.
After looping the array and printing an Hex this is what I find

Publisher:
MessageId: 414D5120514D5F53443920202020202054D07AF120078366
Correl: 000000000000000000000000000000000000000000000000

Sub1:(MQSUB to the Publisher)
MsgId: 414D5120514D5F53443920202020202054D07AF120078367
CorrelId: 414D5120514D5F53443920202020202054D07AF120078104

Sub2:(MQSUB to the Publisher)
MsgId: 414D5120514D5F53443920202020202054D07AF120078368
CorrelId: 414D5120514D5F53443920202020202054D07AF120076404

Queue Connected to Topic: (MQOPEN to the Connected Topic)
MsgId: 414D5120514D5F53443920202020202054D07AF12007836A
CorrelId: 414D5120514D5F53443920202020202054C9F6E4200499EC

Report On ReplyToQ:(MQOPEN to ReplyToQ)
MsgId: 414D5120514D5F53443920202020202054D07AF12007810F
CorrelId: 414D5120514D5F53443920202020202054D07AF120078367
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 03, 2015 8:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

In the pub / sub model the correlation id is traditionally used for something else. If you use a straight request reply set up (p2p) you can correlate.
However as you can see the msgid / correlation id is pretty useless when doing pub/sub.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Tue Feb 03, 2015 9:24 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

can you explain why publishers need to know that a subscriber has received a publication? One of the principles of the pub/sub model is that publishers and subscribers are not connected - they have no explicit relationship, no knowledge of each other.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 04, 2015 5:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I remember something about an option to receive some kind of MQRC or etc. if 0 subscribers received a publication...

I don't remember the details. And I am reasonably sure it doesn't tell you how many more than 0.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 04, 2015 5:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mqjeff wrote:
I remember something about an option to receive some kind of MQRC or etc. if 0 subscribers received a publication...

I don't remember the details. And I am reasonably sure it doesn't tell you how many more than 0.

There is an option to force all or nothing and get a RC for the publication.
You have however to send a request message as a publication (with replyto qmgr and replyto queue).
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Monitoring for COD or COA
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.