The message headers
A message header is a part of a message that contains information
used to process the message, but that is not part of the message body.
Like all IBM MQ
messages, an FTM SWIFT message
has a standard IBM MQ
message descriptor (MQMD) header, but it also has an additional header
called an IBM MQ
rules and formatting header 2 (MQRFH2):
- The MQMD contains
information specific to IBM MQ.
It contains the control information needed to handle the exchange
of messages between applications and
FTM SWIFT. Parts of the MQMD
are interpreted by FTM SWIFT
to define its processing, for example:
- The message type (MQMD.MsgType)
- The message ID (MQMD.MsgId)
- The user associated with the message (MQMD.UserIdentifier)
- The application associated with the message (MQMD.PutApplName)
- The target queue and queue manager for reply messages (MQMD.ReplyToQ and MQMD.ReplyToQMgr)
- Correlation information that enables applications to correlate requests and replies (MQMD.MsgId and MQMD.CorrelId)
- Report options to specify the requested reports.
- The MQRFH2 contains information
specific to the message broker product.
Folders in the MQRFH2 contain the control information
that FTM SWIFT services require
to perform their specific functions.
The MQRFH2 can contain any number of folders. Each folder has a NameValueData field (which contains the data in the folder) and a NameValueLength field (which specifies the length of the data in the NameValueData field). This is common in broker messages and is described in IBM Documentation for Message Broker.
An application can store the following information in this header:- FTM SWIFT attributes of the message.
- FTM SWIFT service requests and responses. This can be, for example, requests to record audit data or events, or requests created as a result of configuration commands, and their corresponding responses.
- Properties that represent configuration parameters relevant for the processing of the message. These properties are provided by one of the configuration-data provider nodes (DniConfigProvider or DniSelConfigProvider) during processing, and applications can access them.
- mcd
- The message content descriptor, which
describes:
- Which parser is to parse the message body
- Which message type and format that parser is to use
- psc
- Publish or subscribe commands to be processed.
- pscr
- Responses to publish or subscribe commands.
- usr
- Application-defined or user-defined properties.
- ComIbmDni
- This folder contains the information that FTM SWIFT needs to process a message and to perform the requested action. It is described in ComIbmDni folders.
Notes:- The MQRFH2 consists of a variable section, which contains a folder structure, and a fixed section, which describes the variable section. The variable section is called NameValueData, and its CCSID is specified by the NameValueCCSID field which must be set to 1208 (UTF-8).
- Although the format of the MQRFH2 is similar to XML, the MQRFH2
cannot contain comments. For example, the following XML comment would
produce an error:
<!-- this is a comment -->
Table 1 describes
the fields and folders of the MQMD and MQRFH2 of
an FTM SWIFT message, and shows
examples of typical field values.
| Field | Sample field values | Description and comments | |
|---|---|---|---|
| MQMD fields | MsgId | SENDQMGR123 | A unique message identifier byte sequence. IBM MQ usually fills this field. |
| UserIdentifier | SHR | The user identifier of the application that originated this message. | |
| CorrelId | SENDQMGR123 | The message identifier of the request message for FTM SWIFT response/report messages. | |
| ReplyToQ | CMQ.B7DDB69181268940 | The name of the message queue to which the application receiving this message sends the reply. | |
| MsgType | MQMT_REQUEST | The numeric value indicating the type of this message. Here, it is a request that requires a reply. | |
| PutApplName | SHR3 | The name of the application that sends this message to FTM SWIFT. IBM MQ fills this field. | |
| Priority | 0 | A number from 0 - 9 that specifies the priority of the message. Except for the SIPN FIN and MSIF transfer services, all FTM SWIFT services ignore this field. The SIPN FIN and MSIF transfer service process messages with a higher priority before those with a lower priority. If more than one message has the highest priority, they process the one that was in the input queue the longest. | |
| Encoding | MQENC_NATIVE | The numeric encoding of numeric data in the section following the MQMD. Here, it is the MQRFH2 structure. | |
| CodedCharSetId | 500 | The character set identifier of the message section following the MQMD. Here, it is the MQRFH2 structure. | |
| Format | MQRFH2 | The format name of data that follows the message descriptor. Here, it indicates that the MQRFH2 Version2 rules and formatting header follow the message descriptor MQMD. | |
| MQRFH2 fields | StrucLength | length | The total length, in bytes, of the MQRFH2 structure, including the folders it contains. |
| CodedCharSetId | 500 | The coded character set identifier (CCSID) of the data that follows this header (usually the message body). | |
| Format | MQFMT_STRING | A constant that indicates the format of the
data contained in the body of the message:
|
|
| NameValueCCSID | 1208 | The character set identifier of data in the NameValueData field (the mcd or ComIbmDni folder content). Set the value to 1208 ("UTF-8"). | |
| mcd folder in MQRFH2 | NameValueLength | length | The length, in bytes, of the data in the NameValueData field, that is, the length of mcd folder content. |
| NameValueData | |
The message content descriptor. For more information, see IBM Documentation for Message Broker. | |
| ComIbmDni folder in MQRFH2 | NameValueLength | length | The length, in bytes, of the ComIbmDni folder. |
| NameValueData | |
The ComIbmDni folder (see ComIbmDni folders). |