IBM MQ messages
An IBM MQ message consists of message properties and application data. The message queuing message descriptor (MQMD) contains the control information that accompanies the application data when a message travels between the sending and receiving applications.
Parts of a message
IBM MQ messages consist of two parts:- Message properties
- Application data
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 UNIX, Linux , and Windows, the MaxMsgLength attribute of the queue manager and the queue defaults to 4 MB (4 194 304 bytes) which we can change up to a maximum of 100 MB (104 857 600 bytes) if required.
On IBM i, the MaxMsgLength attribute of the queue manager and the queue defaults to 4 MB (4 194 304 bytes) which we can change up to a maximum of 100 MB (104 857 600 bytes) if required. If you are intending to use IBM MQ messages greater than 15 MB on IBM i, see Building your procedural application on IBM i.
On 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 we 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.
We create a message when we 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
We 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.
For a description of how to use the fields within the MQMD that contain information about the origin of the message, see Message context.
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.