IBM MQ messages

This information introduces the IBM® MQ message concept, message parts, and the message descriptor.

IBM MQ messages consist of two parts:
  • Message properties
  • Application data
Figure 1 represents a message and shows how it is logically divided into message properties and application data.
Figure 1. Representation of a message
A message made up of: Message Descriptor, which in turn is made up of Message ID and Persistence. These form message properties. The Application Data portion of the message contains two fields: Address and Claim Details.

The application data that is carried in an IBM MQ message is not changed by a queue manager unless data conversion is carried out on it. Also, IBM MQ does not put any restrictions on the content of this data. The length of the data in each message cannot exceed the value of the MaxMsgLength attribute of both the queue and queue manager.

On IBM MQ for AIX®, [IBMi] IBM MQ for IBM i, IBM MQ for HP-UX, IBM MQ for Linux®, IBM MQ for Solaris, and IBM MQ for Windows, the MaxMsgLength attribute of the queue manager and the queue defaults to 4 MB (4 194 304 bytes) which you can change up to a maximum of 100 MB (104 857 600 bytes) if required.

[IBMi]Note: If you are intending to use IBM MQ messages greater than 15 MB on IBM i, see Building your procedural application on IBM i.

[z/OS]On IBM MQ for z/OS®, the MaxMsgLength attribute of the queue manager is fixed at 100 MB and the MaxMsgLength attribute of the queue defaults to 4 MB (4 194 304 bytes) which you can change up to a maximum of 100 MB if required.

Make your messages slightly shorter than the value of the MaxMsgLength attribute in some circumstances. For more information, see The data in your message.

You create a message when you use the MQPUT or MQPUT1 MQI calls. As input to these calls, you supply the control information (such as the priority of the message and the name of a reply queue) and your data, and the call then puts the message on a queue. See MQPUT and MQPUT1 for more information about these calls.

Message descriptor
You can access message control information by using the MQMD structure, which defines the message descriptor.

For a full description of the MQMD structure, see MQMD - Message descriptor.

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. 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 extra fields. These fields are described in the MQMDE - Message descriptor extension.