+

Search Tips | Advanced Search

Limiting the size of a message in a client application

A queue manager has a maximum message length, but the maximum size of message we 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.

On Multiplatforms, we can increase the maximum message length attribute of a queue manager. For more information, see ALTER QMGR.

We 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 we 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 we 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.

Parent topic: Use the MQI in a client application


Related concepts


Related information

Last updated: 2020-10-04