Hello,
JMSMessageID is read only in Websphere MQ JMS implementation.
Extract from Websphere MQ Infocenter : Mapping JMS header fields at send() or publish()
JMSMessageID from MQMD MessageID
All messages sent from JMS have unique message identifiers assigned by WebSphereŽ MQ. The value assigned is returned in the MQMD messageId field after the MQPUT call, and is passed back to the application in the JMSMessageID field. The WebSphere MQ messageId is a 24-byte binary value, whereas the JMSMessageID is a string. The JMSMessageID is composed of the binary messageId value converted to a sequence of 48 hexadecimal characters, prefixed with the characters ID:. JMS provides a hint that can be set to disable the production of message identifiers. This hint is ignored, and a unique identifier is assigned in all cases. Any value that is set into the JMSMessageId field before a send() is overwritten.
Other information about JMS to Websphere MQ headers mapping extracted from Websphere MQ Infocenter : Mapping JMS fields onto WebSphere MQ fields (outgoing messages)
Outgoing message field mapping
Code:
| JMS header field | MQMD field used | Header | Set by |
| name | used for transmission | | |
| | | | |
| JMSDestination | | MQRFH2 | Send Method |
| JMSDeliveryMode | Persistence | MQRFH2 | Send Method |
| JMSExpiration | Expiry | MQRFH2 | Send Method |
| JMSPriority | Priority | MQRFH2 | Send Method |
| JMSMessageID | MessageID | | Send Method |
| JMSTimestamp | PutDate/PutTime | | Send Method |
| JMSCorrelationID | CorrelId | MQRFH2 | Message Object |
| JMSReplyTo | ReplyToQ/ReplyToQMgr | MQRFH2 | Message Object |
| JMSType | | MQRFH2 | Message Object |
| JMSRedelivered | | | Receive-only |
Outgoing message JMS property mapping
Code:
| JMS property name | MQMD field used | Header | Set by |
| | for transmission | | |
| | | | |
| JMSXUserID | UserIdentifier | | Send Method |
| JMSXAppID | PutApplName | | Send Method |
| JMSXDeliveryCount | | | Receive-only |
| JMSXGroupID | GroupId | MQRFH2 | Message Object |
| JMSXGroupSeq | MsgSeqNumber | MQRFH2 | Message Object |
Hope this helps,
Cyrille