|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Getting Queue Name property in Java Compute Node |
« View previous topic :: View next topic » |
Author |
Message
|
DevNYC1 |
Posted: Thu Apr 06, 2017 12:05 pm Post subject: Getting Queue Name property in Java Compute Node |
|
|
Apprentice
Joined: 22 Aug 2012 Posts: 32
|
I have a Java Compute Node and would like to get access to the QueueName (queueName) property of MQInput node this is connected to this Java Compute Node?
I.e., what to know at run time what queue sent the message to this JavaCompute node.
Is this possible? I searched extensively in the IBM documentation and online, including this forum, and cannot find any information on this.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 06, 2017 12:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
In ESQL it's in the MQMD domain of the message tree under SourceQueue.
Lord alone knows what that is in Java. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
adubya |
Posted: Thu Apr 06, 2017 12:34 pm Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
Interrogate the MQMD of the input message ?
Code: |
public void evaluate(MbMessageAssembly assembly) throws MbException {
// --------------------------------------------------------------
// output terminals
// --------------------------------------------------------------
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");
// --------------------------------------------------------------
// get root element
// --------------------------------------------------------------
MbElement root = assembly.getMessage().getRootElement();
// --------------------------------------------------------------
// get queue name from MQMD
// --------------------------------------------------------------
String queueName = root.getFirstElementByPath(
"/MQMD/SourceQueue").getValue().toString()
..
..
..
|
_________________ Independent Middleware Consultant
andy@knownentity.com
Last edited by adubya on Thu Apr 06, 2017 12:37 pm; edited 3 times in total |
|
Back to top |
|
 |
DevNYC1 |
Posted: Thu Apr 06, 2017 12:34 pm Post subject: |
|
|
Apprentice
Joined: 22 Aug 2012 Posts: 32
|
This is wonderful, guys. I will try. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|