You can access message control information using the MQMD structure, which defines the message descriptor. For a full description of the MQMD structure, see WebSphere MQ Application Programming Reference.
See Message context for a description of how to use the fields within the MQMD that contain information about the origin of the message.
There are different versions of the Message Descriptor defined. Additional information for grouping and segmenting messages (see Message groups) is provided in Version 2 of the Message Descriptor (or the MQMDE). This is the same as the Version 1 Message Descriptor but has additional fields. These are described in WebSphere MQ Application Programming Reference.