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 » WebSphere Message Broker (ACE) Support » Get the Topic Name of an MQ message being read from a queue

Post new topic  Reply to topic
 Get the Topic Name of an MQ message being read from a queue « View previous topic :: View next topic » 
Author Message
nick12
PostPosted: Thu Jul 18, 2024 9:23 am    Post subject: Get the Topic Name of an MQ message being read from a queue Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 18

Suppose I have a Topic in my MQ queue manager, a subscription from that topic to an MQ queue, and an ESB/IIB/ACE flow processing messages from that queue using an MQInput node.

Is there a way to, inside the flow, get the name of the topic that the message being processed originated from? This is purely for logging purposes.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Jul 23, 2024 5:39 pm    Post subject: Re: Get the Topic Name of an MQ message being read from a qu Reply with quote

Jedi Knight

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

Have you reviewed https://www.ibm.com/docs/en/ibm-mq/9.4?topic=applications-publishsubscribe-message-properties ?
_________________
Glenn
Back to top
View user's profile Send private message
nick12
PostPosted: Wed Jul 24, 2024 7:15 am    Post subject: Re: Get the Topic Name of an MQ message being read from a qu Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 18

gbaddeley wrote:
Have you reviewed https://www.ibm.com/docs/en/ibm-mq/9.4?topic=applications-publishsubscribe-message-properties ?


Thanks for the response!

I did find info about using MQINQMP , however I do not know how to do that from within the broker (Ideally in an ESQL compute node, without using java).

And since I'm reading from a queue (Not the topic directly) with an MQInput in the broker, I'm not sure that the `MQRFH2` folder of the publish message is available (If it is, I haven't been able to figure out how to access it).
Back to top
View user's profile Send private message
timber
PostPosted: Thu Jul 25, 2024 5:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
I'm not sure that the `MQRFH2` folder of the publish message is available (If it is, I haven't been able to figure out how to access it).
The RFH2 header certainly is available from your message flow. See https://www.ibm.com/docs/en/app-connect/12.0?topic=headers-accessing-mqrfh2-header (use InputRoot instead of OutputRoot, obviously)
Back to top
View user's profile Send private message
nick12
PostPosted: Thu Jul 25, 2024 6:22 am    Post subject: Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 18

timber wrote:
The RFH2 header certainly is available from your message flow. See https://www.ibm.com/docs/en/app-connect/12.0?topic=headers-accessing-mqrfh2-header (use InputRoot instead of OutputRoot, obviously)


I checked and EXISTS(InputRoot.MQRFH2[]) is giving me false.

I also checked for MQRFH2C and it also gives false

I tried both with and without checking the "Use MQRFH2C compact parser for MQRFH2 header" checkbox on the input node.

Note that, as I stated previously, I'm reading from a *queue*, not from the topic directly. Could that be why the RFH2 header does not seem to be available?

I do have `InputRoot.MQMD` available, but all it seems to have is the queue name.
Back to top
View user's profile Send private message
nick12
PostPosted: Thu Jul 25, 2024 6:36 am    Post subject: Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 18

I figured out that I can configure "RFH2" instead of "Message properties" in the MQ susbscription with MQ Explorer, and doing so makes an RFH2 folder show up in the message the broker gets.

Doing so makes `InputRoot.MQRFH2.psc.Topic` contain the string I was looking for.

Thank you both for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Get the Topic Name of an MQ message being read from a queue
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.