|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem in getting MQ MessageId within JMS |
« View previous topic :: View next topic » |
Author |
Message
|
balurnair |
Posted: Fri Jul 23, 2010 3:58 am Post subject: Problem in getting MQ MessageId within JMS |
|
|
Newbie
Joined: 08 Dec 2009 Posts: 4
|
Hi All,
I am working with WMQ JMS binding. The JMS logical queues are in weblogic and in my MDB when i receive the message the getJMSMessageID() is giving me back an entirely different ID than the one which I have setted using MQMessage.messageId.
Here MQMessageId takes input as bytes and getJMSMessageID() gives return as String. Please let me know is there a way to retain/get the same MQMessageId when I do a getJMSMessageID() in my MDB.
Thanks In Advance,
Balu Nair |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Jul 23, 2010 5:37 am Post subject: Re: Problem in getting MQ MessageId within JMS |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
balurnair wrote: |
Hi All,
I am working with WMQ JMS binding. The JMS logical queues are in weblogic and in my MDB when i receive the message the getJMSMessageID() is giving me back an entirely different ID than the one which I have setted using MQMessage.messageId.
Here MQMessageId takes input as bytes and getJMSMessageID() gives return as String. Please let me know is there a way to retain/get the same MQMessageId when I do a getJMSMessageID() in my MDB.
Thanks In Advance,
Balu Nair |
are you getting a byte converted String.
are there any conversion happening on the MDB side.? _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 23, 2010 7:23 am Post subject: Re: Problem in getting MQ MessageId within JMS |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
balurnair wrote: |
Hi All,
I am working with WMQ JMS binding. The JMS logical queues are in weblogic and in my MDB when i receive the message the getJMSMessageID() is giving me back an entirely different ID than the one which I have setted using MQMessage.messageId.
Here MQMessageId takes input as bytes and getJMSMessageID() gives return as String. Please let me know is there a way to retain/get the same MQMessageId when I do a getJMSMessageID() in my MDB.
Thanks In Advance,
Balu Nair |
Don't know exactly what you are trying to do...
However on each "send" JMS assigns a new MessageId.
The MessageId returned by JMS is byte represendation in hex form of the byte array... in provider format...
so for a byte[24] you get "ID:" + 48 char representing in hex form each of the byte values.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
balurnair |
Posted: Mon Jul 26, 2010 9:54 pm Post subject: |
|
|
Newbie
Joined: 08 Dec 2009 Posts: 4
|
Hi All,
I think I got the reason..In JMS-MQ field mapping for JMSMessageID to MQMQ.MessageID is set by Send(), a value is assigned when the send() or publish() is performed (any value held in the JMS message is ignored). The value in the JMS message is updated to show the value used. So ideally we should use CorrelationID for any kind of request-response matching..because JMSCorrelationID-MQMD.CorrelationID is set by MessageObject and not by Send()...Please confirm.
Regards,
Balu Nair |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jul 27, 2010 7:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
balurnair wrote: |
Hi All,
I think I got the reason..In JMS-MQ field mapping for JMSMessageID to MQMQ.MessageID is set by Send(), a value is assigned when the send() or publish() is performed (any value held in the JMS message is ignored). The value in the JMS message is updated to show the value used. So ideally we should use CorrelationID for any kind of request-response matching..because JMSCorrelationID-MQMD.CorrelationID is set by MessageObject and not by Send()...Please confirm.
Regards,
Balu Nair |
You got it.  _________________ MQ & Broker admin |
|
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
|
|
|
|