ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem in getting MQ MessageId within JMS

Post new topic  Reply to topic
 Problem in getting MQ MessageId within JMS « View previous topic :: View next topic » 
Author Message
balurnair
PostPosted: Fri Jul 23, 2010 3:58 am    Post subject: Problem in getting MQ MessageId within JMS Reply with quote

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
View user's profile Send private message
Gaya3
PostPosted: Fri Jul 23, 2010 5:37 am    Post subject: Re: Problem in getting MQ MessageId within JMS Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 23, 2010 7:23 am    Post subject: Re: Problem in getting MQ MessageId within JMS Reply with quote

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
View user's profile Send private message Send e-mail
balurnair
PostPosted: Mon Jul 26, 2010 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 27, 2010 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem in getting MQ MessageId within JMS
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.