Author |
Message
|
satya.sid |
Posted: Fri Dec 17, 2010 8:45 am Post subject: Setting MQ MsgId from Application but getting overwritten |
|
|
Novice
Joined: 14 Jan 2009 Posts: 15
|
Hi
I am using WID/WPS v7.0.0.3. From my application I am setting the MQ MsgId at path "smo/headers/MQHeader/md/MsgId". The sample msgId may be 'E51DDBDA012C4000E00019A40A2F2436E51DDBDA012C4000'
In the "MQ Import" the Msg Id proporty I am choosing the "Copy from the SCA Message" instead of "New Message ID".
But still the MsgId is getting overwritten by someother value by QueueManager.
ANy idea why is this happening?
Regards
Satya |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 17, 2010 8:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
From your message using WPS I expect you'd be using JMS...
Check the JMS specification. I don't think it allows you to set the MsgId. But you could set the CorrelId and go with that...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
satya.sid |
Posted: Fri Dec 17, 2010 9:02 am Post subject: |
|
|
Novice
Joined: 14 Jan 2009 Posts: 15
|
Thanks for the quock reply..
I am using 'MQ Import' and setting the MsgId in the MQ header part only.
Using JMS I know you can set the msg id from the application, but as far I know you can set the MsgId if using MQ as queue manager.
If not then in MQ Import, the whats the use of two options "Copy from the SCA Message" vs "New Message ID".
-Satya |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 17, 2010 9:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
satya.sid wrote: |
Thanks for the quock reply..
I am using 'MQ Import' and setting the MsgId in the MQ header part only.
Using JMS I know you can set the msg id from the application, but as far I know you can set the MsgId if using MQ as queue manager.
If not then in MQ Import, the whats the use of two options "Copy from the SCA Message" vs "New Message ID".
-Satya |
I suspect this might only apply to the incoming message from SCA but not to and outgoing MQ message...Open a PMR for clarification. _________________ MQ & Broker admin |
|
Back to top |
|
 |
satya.sid |
Posted: Sat Dec 18, 2010 5:48 pm Post subject: Issue Resolved |
|
|
Novice
Joined: 14 Jan 2009 Posts: 15
|
Hi All
Finally its resolved...
Below two points you have to take care if you want MsgId to be generated & set from the Application and then send the msg to Queue.
1. First make sure in the MQ import -> Proporties -> Binding -> Message Confirguration -> Request Message Id option -: "Copy from SCA message".
2. Make sure you are assigning a correct MsgId and in correct manner.
2.1 MsgId should be 48 char HexDecimal String (so that it accomodates in MQBYTE24).
2.2 If using XSLT to assign the MsgId then can do string assignment or custom Java where the method returns correct string format MsgId.
2.3 If using java snippet in custom mediation then may use as below.
Code: |
smo.setBytes("headers/MQHeader/md/MsgId",MyAppJavaUtil.getMsgIdBytes());
or
smo.setString("headers/MQHeader/md/MsgId",MyAppJavaUtil.getMsgIdString()); |
|
|
Back to top |
|
 |
|