Author |
Message
|
_Angus_ |
Posted: Thu Dec 03, 2009 10:13 am Post subject: Websphere MQ Java & Message Properties |
|
|
 Acolyte
Joined: 25 Apr 2005 Posts: 54 Location: Edinburgh
|
I'm trying to figure out how to set v7 message properties like "mcd.Type" in the MQMessage class - at the moment everything I try for certain reserved keys throws a property not available exception.
I understand v7 message properties have been introduced to ease things with JMS but I would still expect to be able to set what I like from the native MQ Java classes (even though I know they are build on top of the jmqi now).
Any help would be much appreciated...
Cheers,
Angus _________________ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Angus Cooke ~ AngusSoft
Integration Development Tools
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
|
Back to top |
|
 |
vmcgloin |
Posted: Thu Dec 03, 2009 3:25 pm Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
|
Back to top |
|
 |
_Angus_ |
Posted: Fri Dec 04, 2009 2:46 am Post subject: |
|
|
 Acolyte
Joined: 25 Apr 2005 Posts: 54 Location: Edinburgh
|
Thanks for the link Vicky (I missed that one in my search!), that has helped a fair bit and the JMSXxxx properties I've tried setting using the real property name and not the synonym have produced the correct synonym property when I've created a new message and read it back.
However, "mcd.Type", "mcd.Set" & "mcd.Fmt" don't appear to work. They all throw the property not available exception (MQRC_PROPERTY_NOT_AVAILABLE)... and testing this further I've discovered if you set "JMSType" then that works and creates the real property "mcd.Type"!
Surely this is an MQ client bug  _________________ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Angus Cooke ~ AngusSoft
Integration Development Tools
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 04, 2009 3:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
_Angus_ wrote: |
Thanks for the link Vicky (I missed that one in my search!), that has helped a fair bit and the JMSXxxx properties I've tried setting using the real property name and not the synonym have produced the correct synonym property when I've created a new message and read it back.
However, "mcd.Type", "mcd.Set" & "mcd.Fmt" don't appear to work. They all throw the property not available exception (MQRC_PROPERTY_NOT_AVAILABLE)... and testing this further I've discovered if you set "JMSType" then that works and creates the real property "mcd.Type"!
Surely this is an MQ client bug  |
I wouldn't think so. I would expect this to be the way things are designed.
Setting the JMSType may do more than just setting this field for you. It may also ensure the compatibility between multiple property values so that there is no error if the message is being consumed by a JMS app. So I would go for working as designed.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
_Angus_ |
Posted: Mon Dec 07, 2009 3:03 am Post subject: |
|
|
 Acolyte
Joined: 25 Apr 2005 Posts: 54 Location: Edinburgh
|
Ok - so working as designed with a documentation update to clarify things would be nice, (an "undocumented feature" as we used to call it ). _________________ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Angus Cooke ~ AngusSoft
Integration Development Tools
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
|
Back to top |
|
 |
|