Author |
Message
|
Boomn4x4 |
Posted: Mon Oct 08, 2012 7:19 am Post subject: message properties vs MQRFH2 header |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
I'm looking to stick a checksum of a message onto the message header so that the message can be shredded by the broker and validated at the destination.
Since I'm using V7, is there any reason I should be putting the checksum in the RFH2 header as opposed to setting it as a message property?
I'm being nudged towards putting it in the <usr> folder of the RFH2 header... but from what I've read... specifically here: http://www.mqseries.net/phpBB2/viewtopic.php?p=318640&highlight=#318640 ... I should be putting it in as a message property. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 08, 2012 7:25 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should put it into a property.
When broker reads it, it will get turned into an MQRFH2 header. Because broker is behind the times.
But when broker emits it, it will get turned into properties again. |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Mon Oct 08, 2012 7:30 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
mqjeff wrote: |
You should put it into a property. |
What is the benefit in doing so? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 08, 2012 7:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Boomn4x4 wrote: |
mqjeff wrote: |
You should put it into a property. |
What is the benefit in doing so? |
It's the supported and maintained choice. The RFH2 is replaced by message properties in v7 and later. If you're using MQ v7.0 and later, your MQ applications should read and write message properties. |
|
Back to top |
|
 |
KoGor |
Posted: Wed Oct 31, 2012 1:49 am Post subject: |
|
|
Voyager
Joined: 09 Nov 2005 Posts: 81 Location: Moscow,Russia.
|
But how can I create message property in WMB? Can I use this code to add message property to the incoming message? Do WMB convert this RFH2 to message properties when it will be put to the out queue?
Code: |
CREATE NEXTSIBLING OF OutMsgRoot.MQMD DOMAIN 'MQRFH2' NAME 'MQRFH2';
SET OutMsgRoot.MQRFH2.usr.DeleteRFH2usr = TRUE;
SET OutMsgRoot.MQRFH2.usr.Report = InMsgRoot.MQMD.Report;
SET OutMsgRoot.MQRFH2.usr.Expiry = InMsgRoot.MQMD.Expiry; |
Now I see in MQ Explorer that the message has MQRFH2 header in MQMD.Format field. I think this is not a message properties used, but MQRFH2 as usual. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 31, 2012 4:25 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
KoGor wrote: |
But how can I create message property in WMB? Can I use this code to add message property to the incoming message? Do WMB convert this RFH2 to message properties when it will be put to the out queue?
Code: |
CREATE NEXTSIBLING OF OutMsgRoot.MQMD DOMAIN 'MQRFH2' NAME 'MQRFH2';
SET OutMsgRoot.MQRFH2.usr.DeleteRFH2usr = TRUE;
SET OutMsgRoot.MQRFH2.usr.Report = InMsgRoot.MQMD.Report;
SET OutMsgRoot.MQRFH2.usr.Expiry = InMsgRoot.MQMD.Expiry; |
Now I see in MQ Explorer that the message has MQRFH2 header in MQMD.Format field. I think this is not a message properties used, but MQRFH2 as usual. |
Well, unfortunately, as of this writing no shipping release of Broker properly supports message properties. You are forced to treat the message properties as RFH headers. But you can configure the queue to force an MQRFH2 header into properties by altering it's definition.
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=20925 |
|
Back to top |
|
 |
|