JMS Header fields are stored within an
MQeMsgObject using
the following rules:
- If a JMS header field is identical to a defined MQeMsgObject field
then the header value is mapped directly to the appropriate field in the MQeMsgObject.
- If a JMS header field does not map directly to a defined field but can
be represented using existing fields defined by MQe then the JMS header value
is converted as appropriate and then set in the MQeMsgObject.
- If MQe has not defined an equivalent field by then, the header field is
stored within an MQeFields object, which is then embedded in the MQeMsgObject.
This ensures that the JMS header field in question can be restored when the
JMS message is recreated.
The header fields that map directly to
MQeMsgObject fields
are:
Table 1. Header fields that map directly to MQeMsgObject fieldsJMS header field |
MQeMsgObject defined field |
JMSTimestamp |
MQe.Msg_Time |
JMSCorrelationID |
MQe.Msg_CorrelID |
JMSExpiration |
MQe.Msg_ExpireTime |
JMSPriority |
MQe.Msg_Priority |
Two JMS header fields,
JMSReplyTo and
JMSMessageID,
are converted prior to being stored in MQeMsgObject fields.
JMSReplyTo is split between MQe.Msg_ReplyToQMgr and MQe.Msg_ReplyToQ,
while JMSMessageID is the String "ID:" followed
by a 24-byte hashcode generated from a combination of MQe.Msg_OriginQMgr
and MQe.Msg_Time.
The remaining four JMS header fields,
JMSDeliveryMode,
JMSRedelivered,
and
JMSType have no equivalents in MQe. These fields are
stored within an MQeFields object in the following manner:
- As an int field named MQe.MQe_JMS_DELIVERYMODE
- As a boolean field named MQe.MQe_JMS_REDELIVERED
- As a String field named MQe.MQe_JMS_JMSTYPE
This MQeFields object is then stored within the
MQeMsgObject as
MQe.MQe_JMS_HEADER.
Finally, JMSDestination is recreated when the message is received and, therefore
does not need to be stored in the
MQeMsgObject.