Mapping XMS messages onto IBM MQ messages
The JMS header fields and properties of an XMS message are mapped onto fields in the header structures of an IBM MQ message.
When an XMS application is connected to an IBM MQ queue manager, messages sent to the queue manager are mapped onto IBM MQ messages in the same way that IBM MQ classes for JMS messages are mapped onto IBM MQ messages in similar circumstances.
If the XMSC_WMQ_TARGET_CLIENT property of a Destination object is set to XMSC_WMQ_TARGET_DEST_JMS, the JMS header fields and properties of a message sent to the destination are mapped onto fields in the MQMD and MQRFH2 header structures of the IBM MQ message. Setting the XMSC_WMQ_TARGET_CLIENT property in this way assumes that the application that receives the message can handle an MQRFH2 header. The receiving application might therefore be another XMS application, an IBM MQ classes for JMS application, or a native IBM MQ application that has been designed to handle an MQRFH2 header.
If the XMSC_WMQ_TARGET_CLIENT property of a Destination object is set to XMSC_WMQ_TARGET_DEST_MQ instead, the JMS header fields and properties of a message sent to the destination are mapped onto fields in the MQMD header structure of the IBM MQ message. The message does not contain an MQRFH2 header, and any JMS header fields and properties that cannot be mapped onto fields in the MQMD header structure are ignored. The application that receives the message can therefore be a native IBM MQ that's not designed to handle an MQRFH2 header.
IBM MQ messages received from a queue manager are mapped onto XMS messages in the same way that IBM MQ messages are mapped onto IBM MQ classes for JMS messages in similar circumstances.
If an incoming IBM MQ message has an MQRFH2 header, the resulting XMS message has a body whose type is determined by the value of the Msd property contained in the mcd folder of the MQRFH2 header. If the Msd property is not present in the MQRFH2 header, or if the IBM MQ message has no MQRFH2 header, the resulting XMS message has a body whose type is determined by the value of the Format field in the MQMD header. If the Format field is set to MQFMT_STRING, the XMS message is a text message. Otherwise, the XMS message is a bytes message. If the IBM MQ message has no MQRFH2 header, only those JMS header fields and properties that can be derived from fields in the MQMD header are set.
For more information about mapping IBM MQ classes for JMS messages onto IBM MQ messages, see Mapping JMS messages onto IBM MQ messages.
- Reading and writing the message descriptor from a IBM Message Service Client for .NET application
We can access all the message descriptor (MQMD) fields of an IBM MQ message except StrucId and Version; BackoutCount can be read but not written to. This feature is available only when connecting to a IBM WebSphere MQ Version 6.0 or later queue manager and is controlled by destination properties described later. - Accessing IBM MQ Message data from a IBM Message Service Client for .NET application
We can access the complete IBM MQ message data including the MQRFH2 header (if present) and any other IBM MQ headers (if present) within a IBM Message Service Client for .NET application as the body of a JMSBytesMessage.
Parent topic: XMS messages