MQMD (message descriptor)
The MQMD structure describes the information that accompanies the message data of an event message. For an event message, the MQMD structure contains these values:
StrucId
Description: Structure identifier. Datatype: MQCHAR4. Value: MQMD_STRUC_ID
Version
Description: Structure version number. Datatype: MQLONG. Values:
MQMD_VERSION_1 Version-1 message descriptor structure, supported in all environments.
MQMD_VERSION_2 Version-2 message descriptor structure, supported on AIX(R), DOS client, HP-UX, OS/2(R), OS/400, Solaris, Windows NT client and Windows platforms.
Report
Description: Options for report messages. Datatype: MQLONG. Value:
MQRO_NONE No reports required.
MsgType
Description: Indicates type of message. Datatype: MQLONG. Value: MQMT_DATAGRAM.
Expiry
Description: Message lifetime. Datatype: MQLONG. Value:
MQEI_UNLIMITED The message does not have an expiry time.
Feedback
Description: Feedback or reason code. Datatype: MQLONG. Value: MQFB_NONE.
Encoding
Description: Numeric encoding of message data. Datatype: MQLONG. Value: MQENC_NATIVE.
CodedCharSetId
Description: Character set identifier of event message data. Datatype: MQLONG. Value:
MQCCSI_Q_MQR Coded character set ID (CCSID) of the queue manager generating the event.
Format
Description: Format name of message data. Datatype: MQCHAR8. Value:
MQFMT_EVENT Event message.
For the C programming language, the constant MQFMT_EVENT_ARRAY is also defined; this has the same value as MQFMT_EVENT, but is an array of characters not a string.
Priority
Description: Message priority. Datatype: MQLONG. Value:
MQPRI_PRIORITY_AS_Q_DEF Default priority of the event queue, if it is a local queue, or its local definition at the queue manager generating the event.
Persistence
Description: Message persistence. Datatype: MQLONG. Value:
MQPER_PERSISTENCE_AS_Q_DEF Default persistence of the event queue, if it is a local queue, or its local definition at the queue manager generating the event.
MsgId
Description: Message identifier. Datatype: MQBYTE24. Initial value: MQMI_NONE. Valid values: A unique value generated by the queue manager.
CorrelId
Description: Correlation identifier. Datatype: MQBYTE24. Initial value: MQCI_NONE. Valid values:
MQCI_NONE No correlation identifier is specified. This is for local queues only.
For shared queues: a nonzero correlation identifier is set. For events on a shared queue, this parameter is set, so you can track multiple event messages from different queue managers. The characters are specified below:
1-4 Product identifier ('CSQ ')
5-8 Queue-sharing group name
9 Queue manager identifier
10-17 Time stamp
18-24 Nulls
BackoutCount
Description: Backout counter. Datatype: MQLONG. Value: 0.
ReplyToQ
Description: Name of reply queue. Datatype: MQCHAR48. Values: Blank.
ReplyToQMgr
Description: Name of reply queue manager. Datatype: MQCHAR48. Value: The queue manager name at the originating system.
UserIdentifier
Description: Identifies the application that originated the message. Datatype: MQCHAR12. Value: Blank.
AccountingToken
Description: Accounting token that allows an application to charge for work done as a result of the message. Datatype: MQBYTE32. Value: MQACT_NONE.
ApplIdentityData
Description: Application data relating to identity. Datatype: MQCHAR32. Values: Blank.
PutApplType
Description: Type of application that put the message. Datatype: MQLONG. Value:
MQAT_QMGR Queue-manager-generated message.
PutApplName
Description: Name of application that put the message. Datatype: MQCHAR28. Value: The queue manager name at the originating system.
PutDate
Description: Date when message was put. Datatype: MQCHAR8. Value: As generated by the queue manager.
PutTime
Description: Time when message was put. Datatype: MQCHAR8. Value: As generated by the queue manager.
ApplOriginData
Description: Application data relating to origin. Datatype: MQCHAR4. Value: Blank.
Note: If Version is MQMD_VERSION_2, the following additional fields are present:
GroupId
Description: Identifies to which message group or logical message the physical message belongs. Datatype: MQBYTE24. Value:
MQGI_NONE No group identifier specified.
MsgSeqNumber
Description: Sequence number of logical message within group. Datatype: MQLONG. Value: 1.
Offset
Description: Offset of data in physical message from start of logical message. Datatype: MQLONG. Value: 0.
MsgFlags
Description: Message flags that specify attributes of the message or control its processing. Datatype: MQLONG. Value: MQMF_NONE.
OriginalLength
Description: Length of original message. Datatype: MQLONG. Value: MQOL_UNDEFINED.