2031 (07EF) (RC2031): MQRC_MSG_TOO_BIG_FOR_Q_MGR

Explanation

An MQPUT or MQPUT1 call was issued to put a message on a queue, but the message was too long for the queue manager and MQMF_SEGMENTATION_ALLOWED was not specified in the MsgFlags field in MQMD. If segmentation is not allowed, the length of the message cannot exceed the lesser of the queue manager MaxMsgLength attribute and queue MaxMsgLength attribute.

This reason code can also occur when MQMF_SEGMENTATION_ALLOWED is specified, but the nature of the data present in the message prevents the queue manager splitting it into segments that are small enough for the queue manager limit:
  • For a user-defined format, the smallest segment that the queue manager can create is 16 bytes.
  • For a built-in format, the smallest segment that the queue manager can create depends on the particular format, but is greater than 16 bytes in all cases other than MQFMT_STRING (for MQFMT_STRING the minimum segment size is 16 bytes).

MQRC_MSG_TOO_BIG_FOR_Q_MGR can also occur in the Feedback field in the message descriptor of a report message; in this case it indicates that the error was encountered by a message channel agent when it attempted to put the message on a remote queue.

This reason also occurs if a channel, through which the message is to pass, has restricted the maximum message length to a value that is actually less than that supported by the queue manager, and the message length is greater than this value.

Completion code

MQCC_FAILED

Programmer response

Check whether the BufferLength parameter is specified correctly; if it is, do one of the following:
  • Increase the value of the queue manager's MaxMsgLength attribute; the queue's MaxMsgLength attribute may also need increasing.
  • Break the message into several smaller messages.
  • Specify MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in MQMD; this will allow the queue manager to break the message into segments.
  • Check the channel definitions.