|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to set JMS property on a MQ Message |
« View previous topic :: View next topic » |
Author |
Message
|
mangoMan |
Posted: Wed Jan 11, 2006 9:21 am Post subject: How to set JMS property on a MQ Message |
|
|
Acolyte
Joined: 16 Oct 2003 Posts: 69
|
Hi,
I put a message on an MQSeries (v5.3) queue using a java client application. I have a listner MDB running on WAS which picks up the message and inside this MDB I want to lookup a user defined property. This is what I plan on doing inside the MDB txtMsg.getStringProperty("SpecialProp")
How do I set this up in my java client which is dealing with raw MQ. Essentially, I want to know how to map MQ message to a JMS message so I can create new property fields. |
|
Back to top |
|
 |
mvic |
Posted: Wed Jan 11, 2006 9:30 am Post subject: Re: How to set JMS property on a MQ Message |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
mangoMan wrote: |
I put a message on an MQSeries (v5.3) queue using a java client application. |
It will be easiest, if you want to get using JMS, if you also put using JMS. Is this a possibility?
A "raw" MQ message can't have user-defined properties, unless you define the binary format yourself. The way MQ's JMS does this is by encoding in text using an XML-like format, and placing this in the "raw" MQ message. The MQ JMS classes in putter and getter apps have all this built in. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 11, 2006 10:05 am Post subject: Re: How to set JMS property on a MQ Message |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
mvic wrote: |
A "raw" MQ message can't have user-defined properties, unless you define the binary format yourself. The way MQ's JMS does this is by encoding in text using an XML-like format, and placing this in the "raw" MQ message. The MQ JMS classes in putter and getter apps have all this built in. |
Well, a little more technically, the MQ JMS API uses the MQRFH2 header in a very well documented manner, and includes 'folders' in that header that end up containing the properties.
And it will be a significantly large project to build a proper JMS header yourself. So as mvic says... Use JMS.
Or don't use JMS Properties. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|