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 » Disable duplicate COA COD messages on subscriptions

Post new topic  Reply to topic
 Disable duplicate COA COD messages on subscriptions « View previous topic :: View next topic » 
Author Message
mtagarrobang
PostPosted: Thu Apr 21, 2022 4:21 am    Post subject: Disable duplicate COA COD messages on subscriptions Reply with quote

Newbie

Joined: 21 Apr 2022
Posts: 2

Hi!

Is there any way to disable COA COD report mesages on one or more subscriptions for the same Topic? The publisher publish a message for a Topic with report options COA COD, all subscriptions for this topic send back COA COD messages (n) times as (n) subscribers, but only a COA COD pair is requiered.


thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 21, 2022 7:29 am    Post subject: Reply with quote

Grand High Poobah

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

Have you tried asking for COA only?
And why would you ask for COA/COD on pub/sub?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Thu Apr 21, 2022 7:35 am    Post subject: Reply with quote

Poobah

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

Pub/Sub model allows for 0, 1 or more publishers, and 0, 1 or more subscribers - usually neither aware of each other. What purpose/requirement does COA/COD address?
_________________
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
hughson
PostPosted: Thu Apr 21, 2022 10:59 am    Post subject: Re: Disable COA COD messages on subscriptions Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

mtagarrobang wrote:
... but only a COA COD pair is required.


So your application doesn't care once it has received the first COA COD pair. It could throw the rest away.

Alternatively, you could look into other ways of achieving what the COA COD pair does for you. Could you tell us why the publishing app uses the COA COD report? One guess might be that it is using it to determine whether there are any subscribers at all? If that was the reason, you could instead use MQPMO_WARN_IF_NO_SUBS_MATCHED.

Let us know the aim and we may be able to help further.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Thu Apr 21, 2022 11:22 am    Post subject: Reply with quote

Poobah

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

Much has been discussed here regarding the value of COA and COD. IMHO, not much, especially in pub/sub app design model.
_________________
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
mtagarrobang
PostPosted: Mon Apr 25, 2022 5:56 am    Post subject: Reply with quote

Newbie

Joined: 21 Apr 2022
Posts: 2

Thank you for all responses.

The application will deal with the first pair of COA/COD report messages.

Addtionally there is an issue with the MgsID and CorreI ID, the values from the original message need to be passed to the COA/COD reply message.
Report options:
MQRO_PASS_CORREL_ID
MQRO_PASS_MSG_ID

Publish/Subscribe attribute:

Destination Correl ID is set to '000000000000000000000000000000000000000000000000' (48 zeros) so the CorrelId set by the publishing application is maintained in the copy of the message delivered to the subscription, then copied to the COA/COD reply message (MQRO_PASS_CORREL_ID).

Is there any way to maintain the MsgID set by the publishing application and copy it to the COA/COD reply? (The MsgID is not maintained in the copy of the message delivered to the subscription and not copied to the COA/COD reply message (MQRO_PASS_MSG_ID)

thanks
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Apr 25, 2022 3:16 pm    Post subject: Reply with quote

Poobah

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

mtagarrobang wrote:
The application will deal with the first pair of COA/COD report messages.

No, the requesting app must deal with every reply if it created a request message. And, the requesting app must also deal with every COA and COD message if it asked for them. AFIK, there is no configuration that specifies "only one COA/COD, please."

mtagarrobang wrote:
Addtionally there is an issue with the MgsID and CorreI ID, the values from the original message need to be passed to the COA/COD reply message.
Report options:
MQRO_PASS_CORREL_ID
MQRO_PASS_MSG_ID

Publish/Subscribe attribute:

Destination Correl ID is set to '000000000000000000000000000000000000000000000000' (48 zeros) so the CorrelId set by the publishing application is maintained in the copy of the message delivered to the subscription, then copied to the COA/COD reply message (MQRO_PASS_CORREL_ID).

Is there any way to maintain the MsgID set by the publishing application and copy it to the COA/COD reply? (The MsgID is not maintained in the copy of the message delivered to the subscription and not copied to the COA/COD reply message (MQRO_PASS_MSG_ID)

thanks

You appear to misunderstand COA/COD functionality.

COA messages are created by down network MQ receiver-end message channel agents; COD messages are created by down network qmgrs.

The requesting (MQPUTting) app usually requests a new and unique message id (PMO_NEW_MSGID), and populates the ReplyToQueue and ReplyToQueueManager fields in the MQMD. The CorrelId field in the request message is not used by the MQPUTting app, so CorrelId of zeros is no surprise.

The replying (MQGETting app), recognizing that the message is a request message will need to copy the inbound MsgId to the CorrelId field of outbound reply message, AND MQPUT the reply message to the ReplyToQueue and ReplyToQueueManager specified in the request message.

Again, it is unusual (not contemplated in the design and implementation) for publishers to want/need COAs or CODs or replies from subscribers.
_________________
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.


Last edited by bruce2359 on Mon Apr 25, 2022 6:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Apr 25, 2022 3:30 pm    Post subject: Reply with quote

Poobah

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

Moved to API support forum.
_________________
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
hughson
PostPosted: Tue Apr 26, 2022 2:45 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

mtagarrobang wrote:
There is an issue with the MgsID and CorreI ID, the values from the original message need to be passed to the COA/COD reply message.
Report options:
MQRO_PASS_CORREL_ID
MQRO_PASS_MSG_ID

Publish/Subscribe attribute:

Destination Correl ID is set to '000000000000000000000000000000000000000000000000' (48 zeros) so the CorrelId set by the publishing application is maintained in the copy of the message delivered to the subscription, then copied to the COA/COD reply message (MQRO_PASS_CORREL_ID).

Well done for finding this! A lot of people don't. This is the correct way to flow the CorrelId from the publisher to the subscriber.

mtagarrobang wrote:
Is there any way to maintain the MsgID set by the publishing application and copy it to the COA/COD reply? (The MsgID is not maintained in the copy of the message delivered to the subscription and not copied to the COA/COD reply message (MQRO_PASS_MSG_ID)


Since many messages are generated as a result of a publish, each of these generated messages is given a unique MsgID. None of the subscriber copies of the message contains the MsgId from the publisher. There is no option to change this behaviour.

You might find the following blog post a good summary: IBM MQ Little Gem #31: Publisher's CorrelId

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Disable duplicate COA COD messages on subscriptions
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.