Author |
Message
|
vijragem |
Posted: Fri Oct 06, 2017 5:21 am Post subject: How to get a message from MQGET by matching CorrelId in RFH2 |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
Below is my scenario
I have a flow (MQ Input -> Compute -> MQ Get -> MQ Output). The input node will receive a message which will have a CorelID in the payload. It will set that corelID in the MQMD and pass it to MQGet node.
Through the MQGET node, the message that I am going to pick up will have the actual correl ID in the MQRFH2 header i.e. InputRoot.MQRFH2.usr.MQMD.CorrelId. Now, I need to instruct MQGET node to retrieve the CorrelID from MQRFH2 headers rather than actual MQMD headers. Below are the configuration I have made now in MQGet node properties.
1) Checked the option "Use MQRFH2C Compact parser for MQRFH2 header" in the parser option
2) Checked the option "Get by correlation ID"
3) Provided the value as "InputRoot.MQRFH2.usr" under Input MQMD location.
But nothing works, I still get the exception "Failed to find input MQMD location". Am I missing something here
Exception Details:
Text:CHARACTER:MQGet node Exception
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\MQLibrary\linklib\ImbMqGetNode.cpp
Line:INTEGER:981
Function:CHARACTER:ImbMqGetNode::evaluate
Type:CHARACTER:ComIbmMQGetNode
Name:CHARACTER:GetMessage#FCMComposite_1_2
Label:CHARACTER:GetMessage.GENERATE.OUT
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:4631
Text:CHARACTER:Failed to find input MQMD location. Location specified was:
Insert
Type:INTEGER:5
Text:CHARACTER:InputRoot.MQRFH2.usr
Insert
Type:INTEGER:5
Text:CHARACTER:Input MQMD Location |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
fjb_saper |
Posted: Fri Oct 06, 2017 5:30 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Grand High Poobah
Joined: 18 Nov 2003 Posts: 20697 Location: LI,NY
|
You should probably provide the location as InputRoot.MQRFH2.usr.MQMD as the usr bucket is one for a number of things. At the same time I would understand that the location of the MQMD prevents it from being parsed....
So you might have to use the MQGET node to browse, retrieve the information from the MQRFH2.usr and parse it, verify and if expected value do an MQGET on the record with the actual msgid and correlid values of the MQMD...
Hope this helps ![](images/smiles/innocent.gif) _________________ MQ & Broker admin |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
zpat |
Posted: Fri Oct 06, 2017 5:31 am Post subject: |
|
|
![](images/avatars/200698233754e3c3649f6d0.jpg) Jedi Council
Joined: 19 May 2001 Posts: 5849 Location: UK
|
The MQinput node is a wrapper to the MQGET MQI call.
Therefore the behaviour is as documented for the MQGET MQI call with MQGMO_MATCH_CORRELID.
(correct me if I am wrong).
OK then - it's MQMO_MATCH_CORREL_ID _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Last edited by zpat on Tue Nov 14, 2017 2:30 am; edited 1 time in total |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
fjb_saper |
Posted: Fri Oct 06, 2017 5:33 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Grand High Poobah
Joined: 18 Nov 2003 Posts: 20697 Location: LI,NY
|
A simpler way would be to have a service that reads a queue. Have the service determine where the message needs to be put to (usr folder info) and set the actual correlid from the info in the RFH2.usr folder before putting the message to its destination queue.
Have fun ![](images/smiles/innocent.gif) _________________ MQ & Broker admin |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Vitor |
Posted: Fri Oct 06, 2017 5:45 am Post subject: |
|
|
![](images/avatars/905340816499abc1cdfb07.jpg) Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
At the same time I would understand that the location of the MQMD prevents it from being parsed. |
The RFH2 header is in the MQRFH2 domain within IIB. So an MQMD inside the usr folder looks like a BLOB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 6:57 am Post subject: You should probably provide the location as InputRoot.MQRFH2 |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
This also does not work. I am getting the same exception. Could you please let me know how to achieve this in steps. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 6:59 am Post subject: |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
fjb_saper wrote: |
You should probably provide the location as InputRoot.MQRFH2.usr.MQMD as the usr bucket is one for a number of things. At the same time I would understand that the location of the MQMD prevents it from being parsed....
So you might have to use the MQGET node to browse, retrieve the information from the MQRFH2.usr and parse it, verify and if expected value do an MQGET on the record with the actual msgid and correlid values of the MQMD...
Hope this helps ![](images/smiles/innocent.gif) |
Even I have tried giving the option "InputRoot.MQRFH2.usr.MQMD". But no luck, same error.
I need an understanding on the browse part. If we browse the message, how the MQ GET node will try to match the correlID from the RFH2 header. Browsing and Reading does not make big difference when your issues on accessing the RFH2 header to get the CORRELID to get/browse message.
Could you please elaborate how to achieve this. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 7:05 am Post subject: |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
fjb_saper wrote: |
A simpler way would be to have a service that reads a queue. Have the service determine where the message needs to be put to (usr folder info) and set the actual correlid from the info in the RFH2.usr folder before putting the message to its destination queue.
Have fun ![](images/smiles/innocent.gif) |
Nope, it does not work that way. It is acting as a common flow where all the functional flow will be routed via this. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 7:07 am Post subject: |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
Vitor wrote: |
fjb_saper wrote: |
At the same time I would understand that the location of the MQMD prevents it from being parsed. |
The RFH2 header is in the MQRFH2 domain within IIB. So an MQMD inside the usr folder looks like a BLOB. |
You mean to say, it is not possible for MQGET node to read the headers from MQRFH2 to match the correl ID. But if you look, I have selected an option "Use MQRFH2C Compact parser for MQRFH2 header" in the parser option, which suggests that RFH2 headers will be parsed. Could you elaborate your view on this? |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
Vitor |
Posted: Fri Oct 06, 2017 7:20 am Post subject: |
|
|
![](images/avatars/905340816499abc1cdfb07.jpg) Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijragem wrote: |
which suggests that RFH2 headers will be parsed. Could you elaborate your view on this? |
The RFH2 header will be parsed (for it's fixed values) and the various variable elements (folders) will be parsed. The usr folder is supposed to contain properties in the format of character name/value pairs. It's not expecting an MQMD which is a specific BLOB of numeric and character data. What I and my worthy associate are saying is that there's no way we're aware of to associate the MQMD domain (and the associated parser) with something inside the MQRFH2 domain.
This is backed up by the error "Failed to find input MQMD location". It's looking for a part of the input stream that associates to an MQMD. The location you've provided associates to an RFH2. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
mqjeff |
Posted: Fri Oct 06, 2017 7:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What it all comes down to is you have to parse the contents of the MQMD field under your MQRFH2 using the MQMD parser.
Or tell the team sending the requests and replies that they're doing it wrong. _________________ chmod -R ugo-wx / |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
fjb_saper |
Posted: Fri Oct 06, 2017 10:05 am Post subject: |
|
|
![](images/avatars/gallery/misc/2.gif) Grand High Poobah
Joined: 18 Nov 2003 Posts: 20697 Location: LI,NY
|
mqjeff wrote: |
What it all comes down to is you have to parse the contents of the MQMD field under your MQRFH2 using the MQMD parser.
Or tell the team sending the requests and replies that they're doing it wrong. |
Thought about that, but then figured that placing the correlid in the RFH2 was a way of keeping the value while doing pub/sub... ![](images/smiles/innocent.gif) _________________ MQ & Broker admin |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 6:00 pm Post subject: |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
mqjeff wrote: |
What it all comes down to is you have to parse the contents of the MQMD field under your MQRFH2 using the MQMD parser.
Or tell the team sending the requests and replies that they're doing it wrong. |
How the MQMD domain will be parsed inside MQRFH2 in MQGET node.. I do not see any relevant properties in the Parsing option.... I think it is not possible to do within MQGET node... please confirm |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
vijragem |
Posted: Fri Oct 06, 2017 6:02 pm Post subject: |
|
|
Novice
Joined: 09 Jan 2015 Posts: 14
|
Vitor wrote: |
vijragem wrote: |
which suggests that RFH2 headers will be parsed. Could you elaborate your view on this? |
The RFH2 header will be parsed (for it's fixed values) and the various variable elements (folders) will be parsed. The usr folder is supposed to contain properties in the format of character name/value pairs. It's not expecting an MQMD which is a specific BLOB of numeric and character data. What I and my worthy associate are saying is that there's no way we're aware of to associate the MQMD domain (and the associated parser) with something inside the MQRFH2 domain.
This is backed up by the error "Failed to find input MQMD location". It's looking for a part of the input stream that associates to an MQMD. The location you've provided associates to an RFH2. |
I think this is not a possible scenario in MQ Get node.. I have to consider changing the way it works... |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|