|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS Message Type |
« View previous topic :: View next topic » |
Author |
Message
|
iceage |
Posted: Wed Apr 12, 2006 6:37 pm Post subject: JMS Message Type |
|
|
 Acolyte
Joined: 12 Apr 2006 Posts: 68
|
folks ... Got a question on resolution of JMS Message Type.
I see that JMS has five different message types (Byte , Text , Map , Stream and Object) .. And on receiving the message , you can do an "instanceof" of classname to find out the type of the message .
But i have seen and observed is , by default messages with out RFH2 header and MQMD.format set to MQSTR are treated as JMS Text and with format MQFMT_NONE as JMS Byte ..
Where does this behaviour come from ? , who does the resolution to particular Message class and is it from MQMD format , if so what happens with other JMS providers ? ..
How can i find more details on this , any documents / link will be useful .
Also when i print out the queue name , it displays as
Queue:///<QueueName> or
Queue:/<QmgrName>/<QueueName>
Where can i find more information on specification/convention used to describe the queue names ? .. MQSeries Using Java wasnt that helpful ..
Thanks .. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 12, 2006 7:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to read up on JMS.
This is a default behavior. If the message has a format of MQSTR is can be converted (CCSID) and by default is a TextMessage.
If it has format none it cannot be converted and by default has to be treated as a BytesMessage.
As to the conventions for queue naming in J2EE this is a resource definition:
queue://qmgr/queuename?attr1=val1&attrx=valx
ex:
Code: |
String qn = "queue://MYMGR/MYQUEUE?targetClient=1";
Queue myq = session.createQueue(qn); |
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
briancop |
Posted: Thu Apr 13, 2006 1:53 am Post subject: |
|
|
 Apprentice
Joined: 04 Apr 2005 Posts: 28 Location: Hursley, UK
|
The normal JMS->JMS messaging behaviour over WebSphere MQ is that all messages contain an RFH2, which along with lots of other info contains a property indicating which of the 5 (6 if you include no body) JMS message types it is. If you send a non-JMS message from e.g. an MQI-based application over WebSphere MQ to a JMS consumer, that is when the situation you describe occurs, in which case the JMS provider implementation has been written such that it uses Text if the message is formatted as a string and Bytes (unformatted message) otherwise.
As for other JMS providers, well the question doesn't really arise, since MQMD and RFH2 are WebSphere MQ concepts, so non-WebSphere MQ JMS providers will not have to know how to handle MQMD and RFH2 contents.
Brian |
|
Back to top |
|
 |
iceage |
Posted: Thu Apr 13, 2006 4:00 pm Post subject: |
|
|
 Acolyte
Joined: 12 Apr 2006 Posts: 68
|
Thanks all for your valuable inputs.
It really helps and any links to JMS readups are appreciated. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 13, 2006 6:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
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
|
|
|
|