Limiting the size of a message in a client application

A queue manager has a maximum message length, but the maximum size of message you can transmit from a client application is limited by the channel definition.

The maximum message length (MaxMsgLength) attribute of a queue manager is the maximum length of a message that can be handled by that queue manager.

[UNIX, Linux, Windows, IBM i]On Multiplatforms, you can increase the maximum message length attribute of a queue manager. For more information, see ALTER QMGR.

You can find out the value of MaxMsgLength for a queue manager by using the MQINQ call.

If the MaxMsgLength attribute is changed, no check is made that there are not already queues, and even messages, with a length greater than the new value. After you change this attribute, restart applications and channels in order to ensure that the change has taken effect. It is then not possible for any new messages to be generated that exceed the MaxMsgLength of either the queue manager or the queue (unless queue manager segmentation is allowed).

The maximum message length in a channel definition limits the size of a message that you can transmit along a client connection. If an IBM® MQ application tries to use the MQPUT call or the MQGET call with a message larger than this, an error code is returned to the application. The maximum message size parameter of the channel definition does not affect the maximum message size which can be consumed using MQCB over a client connection.