The MQRFH2 header and JMS
- Fixed portion
- The fixed portion is modeled on the standard IBM® MQ header pattern and consists of the following fields:
- StrucId (MQCHAR4)
- Structure identifier.
Must be MQRFH_STRUC_ID (value:
RFH
) (initial value).MQRFH_STRUC_ID_ARRAY (value:
R
,F
,H
,
) is also defined. - Version (MQLONG)
- Structure version number.
Must be MQRFH_VERSION_2 (value: 2) (initial value).
- StrucLength (MQLONG)
- Total length of MQRFH2, including the NameValueData fields.
The value set into StrucLength must be a multiple of 4 (the data in the NameValueData fields can be padded with space characters to achieve this).
- Encoding (MQLONG)
- Data encoding.
Encoding of any numeric data in the portion of the message following the MQRFH2 (the next header, or the message data following this header).
- CodedCharSetId (MQLONG)
- Coded character set identifier.
Representation of any character data in the portion of the message following the MQRFH2 (the next header, or the message data following this header).
- Format (MQCHAR8)
- Format name.
Format name for the portion of the message following the MQRFH2.
- Flags (MQLONG)
- Flags.
MQRFH_NO_FLAGS =0. No flags set.
- NameValueCCSID (MQLONG)
- The coded character set identifier (CCSID) for the NameValueData character strings contained in
this header. The NameValueData can be coded in a character set that differs from the other character
strings that are contained in the header (StrucID and Format).
If the NameValueCCSID is a 2 byte Unicode CCSID (1200, 13488, or 17584), the byte order of the Unicode is the same as the byte ordering of the numeric fields in the MQRFH2. (For example, Version, StrucLength, and NameValueCCSID itself.)
Table 1. Possible values for NameValueCCSID field CCSID Meaning 1200 UTF-16, most recent Unicode version supported 13488 UTF-16, Unicode version 2.0 subset 17584 UTF-16, Unicode version 3.0 subset (includes the Euro symbol) 1208 UTF-8, most recent Unicode version supported - Variable portion
- The variable portion follows the fixed portion. The variable portion contains a variable number of MQRFH2 folders. Each folder contains a variable number of elements or properties. Folders group related properties. The MQRFH2 headers created by JMS can contain any of the following folders:
- The mcd folder
-
mcdcontains properties that describe the format of the message. For example, the message service domain Msd property identifies a JMS message as being JMSTextMessage, JMSBytesMessage, JMSStreamMessage, JMSMapMessage, JMSObjectMessage, or null.The
mcdfolder is always present in a JMS message containing anMQRFH2.It is always present in a message containing an
MQRFH2sent from IBM Integration Bus. It describes the domain, format, type, and message set of a message.Table 2. mcdproperty name, synonym, data type, and folderProperty synonym Property name Data type Folder mcd.Msd string<mcd><Msd>messageDomain</Msd></mcd>mcd.Set string<mcd><Set>messageDomain</Set></mcd>mcd.Type string<mcd><Type>messageDomain</Type></mcd>mcd.Fmt string<mcd><Fmt>messageDomain</Fmt></mcd>Do not add your own properties in the
mcdfolder. - The jms folder
-
jmscontains JMS header fields, and JMSX properties that cannot be fully expressed in theMQMD. Thejmsfolder is always present in a JMSMQRFH2. - The usr folder
-
usrcontains application-defined JMS properties associated with the message. Theusrfolder is present only if an application has set an application-defined property. - The mqext folder
-
mqextcontains the following types of property:- Properties that are used only by WebSphere® Application Server.
- Properties relating to delayed delivery of messages.
Table 3. mqextproperty name, synonym, data type, and folderProperty synonym Property name Data type Folder JMSArmCorrelator mqext.Arm string<mqext><Arm>armCorrelator</Arm></mqext>JMSRMCorrelator mqext.Wrm string<mqext><Wrm>wrmCorrelator</Wrm></mqext>JMSDeliveryTime mqext.Dlt i8<mqext><Dlt>DeliveryTime</Dlt></mqext>JMSDeliveryDelay mqext.Dly i8<mqext><Dly>DeliveryTime</Dly></mqext>Do not add your own properties in the
mqextfolder. - The mqps folder
-
mqpscontains properties that are used only by IBM MQ publish/subscribe. The folder is present only if the application has set at least one of the integrated publish/subscribe properties.Table 4. mqpsproperty name, synonym, data type, and folderProperty synonym Property name Data type Folder MQTopicString mqps.Top string<mqps><Top>topicString</Top></mqps>MQSubUserData mqps.Sud string<mqps><Sud>subscriberUserData...</Sud></mqps>MQIsRetained mqps.Ret boolean<mqps><Ret>isRetained</Ret></mqps>MQPubOptions mqps.Pub i8<mqps><Pub>publicationOptions</Pub></mqps>MQPubLevel mqps.Pbl i8<mqps><Pbl>publicationLevel</Pbl></mqps>MQPubTime mqpse.Pts string<mqps><Pts>publicationTime</Pts></mqps>MQPubSeqNum mqpse.Seq i8<mqps><Seq>publicationSequenceNumber</Seq></mqps>MQPubStrIntData mqpse.Sid string<mqps><Sid>publicationData</Sid></mqps>MQPubFormat mqpse.Pfmt i8<mqps><Pfmt>messageFormat</Pfmt></mqps>Do not add your own properties in the
mqpsfolder.
| JMS field name | Java type | MQRFH2 folder name | Property name | Type/values |
|---|---|---|---|---|
| JMSDestination | Destination | jms | Dst | string |
| JMSExpiration | long | jms | Exp | i8 |
| JMSPriority | int | jms | Pri | i4 |
| JMSDeliveryMode | int | jms | Dlv | i4 |
| JMSCorrelationID | String | jms | Cid | string |
| JMSReplyTo | Destination | jms | Rto | string |
| JMSTimestamp | long | jms | Tms | i8 |
| JMSType | String | mcd | Type, Set, Fmt | string |
| JMSXGroupID | String | jms | Gid | string |
| JMSXGroupSeq | int | jms | Seq | i4 |
| xxx (user defined) | Any | usr | xxx | any |
| mcd | Msd |
jms_none
jms_text jms_bytes jms_map jms_stream jms_object |
- NameValueLength (MQLONG)
- Length in bytes of the NameValueData string that immediately follows this length field (it does not include its own length).
- NameValueData (MQCHARn)
- A single character string, whose length in bytes is given by the preceding NameValueLength
field. It contains a folder holding a sequence of properties. Each property is a name/type/value
triplet, contained within an XML element whose name is the folder name, as follows:
<foldername> triplet1 triplet2 ..... tripletn </foldername>The closing</foldername>tag can be followed by spaces as padding characters. Each triplet is encoded using an XML-like syntax:<name dt='datatype'>value</name>Thedt='datatype'element is optional and is omitted for many properties, because the data type is predefined. If it is included, one or more space characters must be included before thedt=tag.A null value is encoded using the following syntax:
Do not use<name dt='datatype' xsi:nil='true'></name>xsi:nil='false'.Table 6. Property data types Data type Definition string Any sequence of characters excluding <and&boolean The character 0or1(0= false,1= true)bin.hex Hexadecimal digits representing octets i1 A number, expressed using digits 0..9, with optional sign (no fractions or exponent). Must lie in the range -128 to 127 inclusivei2 A number, expressed using digits 0..9, with optional sign (no fractions or exponent). Must lie in the range -32768 to 32767 inclusivei4 A number, expressed using digits 0..9, with optional sign (no fractions or exponent). Must lie in the range -2147483648 to 2147483647 inclusivei8 A number, expressed using digits 0..9, with optional sign (no fractions or exponent). Must lie in the range -9223372036854775808 to 92233720368547750807 inclusiveint A number, expressed using digits 0..9, with optional sign (no fractions or exponent). Must lie in the same range as i8. This can be used in place of one of the i* types if the sender does not want to associate a particular precision with the propertyr4 Floating point number, magnitude <= 3.40282347E+38,>= 1.175E-37 expressed using digits 0..9, optional sign, optional fractional digits, optional exponentr8 Floating point number, magnitude <= 1.7976931348623E+308,>= 2.225E-307 expressed using digits 0..9, optional sign, optional fractional digits, optional exponentA string value can contain spaces. You must use the following escape sequences in a string value:-
&for the&character -
<for the<character
You can use the following escape sequences, but they are not required:-
>for the>character -
'for the'character -
"for the"character
-