What it means
Every queue has a maximum message length (MAXMSGL). Without segmentation, the limit that applies is the smaller of the queue's limit and the queue manager's limit. If the message is larger, the put is refused with 2030. The code can also appear in a report message when a channel could not deliver to a remote queue for this reason.
Typical causes
- The application sends a larger message than the queue was set up for, for example after a new field or attachment was added.
- The buffer length passed on MQPUT is wrong, so MQ thinks the message is bigger than it is.
- The target queue has a smaller MAXMSGL than the same queue in another environment.
- On z/OS, the program relies on segmentation, which the z/OS queue manager ignores.
How to fix it
- Check the buffer length the program passes on MQPUT.
- Compare the message size with DISPLAY QLOCAL(name) MAXMSGL, and with the queue manager's MAXMSGL.
- Raise MAXMSGL on the queue (and on the queue manager if needed), or split the data into several smaller messages.
- On distributed platforms you can allow segmentation with MQMF_SEGMENTATION_ALLOWED; on z/OS you must raise limits or split the data.
Example
Illustrative only; names and values are invented.
MQPUT failed CompCode=2 Reason=2030 Queue=APP.REQUEST.QUEUE Length=6291456
DISPLAY QLOCAL(APP.REQUEST.QUEUE) MAXMSGL
QUEUE(APP.REQUEST.QUEUE) MAXMSGL(4194304)