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 » How to access Put application name & MsgID using JMS.

Post new topic  Reply to topic
 How to access Put application name & MsgID using JMS. « View previous topic :: View next topic » 
Author Message
say_2_anil
PostPosted: Thu Nov 30, 2006 11:21 pm    Post subject: How to access Put application name & MsgID using JMS. Reply with quote

Newbie

Joined: 16 Nov 2006
Posts: 8

Hi,
I am using JMS Client to push message into the MQ Series MQ,

in my code, am setting the Message ID using the following statement.
textMsg.setJMSMessageID("3000");
But i cant find the same ID in 'Message identifier' field of the MQMessage.

how can i set the 'Put application name' property for MQ Series message?



Thanks,
Anil Kumar.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 01, 2006 1:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Read up on the "Using Java" manual. It says that the MQ put application property is read only in JMS.

Don't know what it says about the JMSMessageID. Anyway I would not want to use what you did:
Quote:
textMsg.setJMSMessageID("3000");
for multiple reasons:
  1. the message Id/correlationID fields are clearly stated as being byte[24] (read up in the using java manual)...
  2. The set text method as such is not geared towards using text but allowing for a string representation in Hex values of said byte array.
  3. The provider native version of the methods as stated in the manual offer a considerable performance boost. So if you put "3000" in the field the output of the method in provider native format would be like "ID:333030300000000000000000000000000000000000000000"
  4. These fields are byte[] and as such NEVER get converted across platforms as the byte value of x is always x regardless of the platform...(00<=x<=FF)


So tell us a little bit more about what you are trying to achieve and we will be able to give better advice.
Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Dec 01, 2006 2:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The send operation always generates a new message id.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
say_2_anil
PostPosted: Fri Dec 01, 2006 3:17 am    Post subject: Reply with quote

Newbie

Joined: 16 Nov 2006
Posts: 8

Thanks for the reply,
Every time a new Message ID being generated,
I was setting the MessageID for the TextMessage before sending the message to the queue, but a new MessageID is generating at the MQ Series.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 01, 2006 3:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
The send operation always generates a new message id.


say_2_anil wrote:
a new MessageID is generating at the MQ Series


Functioning as designed
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to access Put application name & MsgID using 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.