Author |
Message
|
say_2_anil |
Posted: Thu Nov 30, 2006 11:21 pm Post subject: How to access Put application name & MsgID using JMS. |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri Dec 01, 2006 1:28 am Post subject: |
|
|
 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:
- the message Id/correlationID fields are clearly stated as being byte[24] (read up in the using java manual)...
- 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.
- 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"
- 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 |
|
 |
jefflowrey |
Posted: Fri Dec 01, 2006 2:27 am Post subject: |
|
|
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 |
|
 |
say_2_anil |
Posted: Fri Dec 01, 2006 3:17 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Fri Dec 01, 2006 3:20 am Post subject: |
|
|
 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 |
|
 |
|