Author |
Message
|
ghoshly |
Posted: Thu Sep 14, 2017 2:17 pm Post subject: MQRFH2 mcd folder for Accounting Statistics and Resource |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
I am enabling Message Flow statistics (using - mqsichangeflowstats ) and Resource Statistics (using - mqsichangeresourcestats ) in IIB v10.0.0.7 environment along with MQ v8.0.0.4
In case of resource statistics message, I do not see MQRFH2 folder, so able to parse XML message using XMLNSC parser. However in WMQIStatisticsAccounting message I see MQRFH2 folder and within mcd 'xml' is mentioned; so I need to parse using XML parser instead. I see mqps.Top with the topic which is shown as unrecognized folder in RFHUtilc.
Is there a way we can get MQRFH2.mcd as 'XMLNSC' for message flow accounting message? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Sep 15, 2017 3:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can't use the XML parser to handle XML data that has namespaces.
You shouldn't ever use the XML parser...
If you need to always have an MQRFH2, then you can configure the queue to always put one there.
If you need to never see an MQRFH2, you can configure the queue to always use properties. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ghoshly |
Posted: Fri Sep 15, 2017 5:34 am Post subject: |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Thanks Jeff for your reply.
When both the subscriptions is made in similar way into a same queue, how one type is adding MQRFH2 while other is not; that was my question.
I still need to learn about the queue configuration you suggested. Any link would be highly appreciated. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 15, 2017 5:47 am Post subject: Re: MQRFH2 mcd folder for Accounting Statistics and Resource |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ghoshly wrote: |
In case of resource statistics message, I do not see MQRFH2 folder, so able to parse XML message using XMLNSC parser. However in WMQIStatisticsAccounting message I see MQRFH2 folder and within mcd 'xml' is mentioned; so I need to parse using XML parser instead. |
No you don't. Think of this more as the "ContentType" in an HTTP header; it's indicating the use of XML rather than another message payload.
ghoshly wrote: |
Is there a way we can get MQRFH2.mcd as 'XMLNSC' for message flow accounting message? |
No, and you don't need to. Parse the message with XMLNSC (if you feed the message to an MQInput node, that's what it will use anyway).
Note that, despite the comments of my most worthy associate, any message properties will end up in the message tree as an RFH2 header; that's just how IIB represents them. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ghoshly |
Posted: Fri Sep 15, 2017 10:42 am Post subject: XPATH evaluation. |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Hello Vitor,
I am subscribing the Statistics message in a MQ queue, and using XMLNSC parser in the MQ Input node for parsing. However as we can see MQRFH2 header is populated with mcd.Msd, whatever domain mentioned is used as parser (overwrites whatever is mentioned in MQ input node)
XPATH mentioned below in Route node works, however if I use XMLNSC instead, wouldn't work.
Code: |
$Root/XML/WMQIStatisticsAccounting/@RecordType="SnapShot" |
XPATH mentioned below in the same Route node also works for Resource Statistics message
Code: |
local-name($Root/XMLNSC/* )="ResourceStatistics" |
|
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 15, 2017 10:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Weird. Can't say I've tried it in v10, but this:
Code: |
$Root/XMLNSC/WMQIStatisticsAccounting and $Root/XMLNSC/WMQIStatisticsAccounting/@RecordType = 'SnapShot'
|
works fine for me in v9.0.0.5 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 15, 2017 10:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I use this:
Code: |
$Root/XMLNSC/ResourceStatistics
|
for resource statistics _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|