MQRC 2030: Message too large for the queue
MQRC 2030 (MQRC_
Other names for this code
Also written as RC2030, reason code 2030, MQ 2030, MQ error 2030, MQRC_MSG_TOO_BIG_FOR_Q, 07EE, 0x07EE, message too big for queue, MAXMSGL, MQJE001 Reason 2030.
What it means
Each queue has a MAXMSGL attribute, and so does the queue manager. A message put without segmentation can't be longer than the smaller of the two. If it is, the put fails with MQCC_
On distributed MQ, an application can set MQMF_
The code also turns up on channels. When a message channel agent can't put an arriving message on the target queue because it is too long, the reason goes into the Feedback field of a report message, or into the dead-letter header if the message goes to the dead-letter queue.
Common causes
- The application sends a larger payload than the queue was sized for, such as a file, an image or a batch of records in one message. The default MAXMSGL on a new queue is 4 MB.
- The local queue allows the size, but the target queue on the remote queue manager has a lower MAXMSGL. The receiving channel then reports 2030 and sends the message to its dead-letter queue.
- The queue's MAXMSGL was raised but the queue manager's MAXMSGL was not. The smaller limit still applies, so the put can fail with 2030 or with 2031.
- The program passes a wrong BufferLength, larger than the real data, so MQ sees a much longer message than intended.
- On z/OS, the queue is a shared queue in a coupling facility structure that can't hold the message size. Shared queue messages over about 63 KB need a structure at CFLEVEL(4) or later with offload to SMDS or Db2.
How to find the problem
- Check the limits on both objects with
DISPLAY QLOCAL(PAYMENTS.andOUT) MAXMSGL DISPLAY QMGR MAXMSGLin runmqsc. On z/OS use the same commands with the command prefix. - Log the message length the program passes on MQPUT. Compare it with both limits and with what the program meant to send.
- If the failure is on a channel, look at the dead-letter queue on the receiving side. The MQDLH header holds reason 2030 and the original destination. Browse it with
amqsbcgordmpmqmsgon distributed MQ. - For a shared queue on z/OS, display the queue's CFSTRUCT and then
DISPLAY CFSTRUCT(...)to check CFLEVEL and OFFLOAD.
How to fix it
- Check BufferLength first. If it is wrong, fix the program and nothing else needs to change.
- If large messages are expected, raise the queue's MAXMSGL with
ALTER QLOCAL(...) MAXMSGL(n). Raise the queue manager's MAXMSGL and every channel's MAXMSGL along the route too, on both ends. The highest value is 100 MB. - Split the data into several smaller messages, ideally in a message group so the receiver can put them back together.
- On distributed MQ only, set MQMF_
SEGMENTATION_ ALLOWED so the queue manager can segment the message. - For a message on a dead-letter queue, fix the limit and then replay it with the dead-letter handler (
runmqdlqon distributed, CSQUDLQH on z/OS).
IBM documentation
IBM documentation: MQRC 2030. Use the documentation for your installed release.
Related codes
Questions
What is the difference between 2030 and 2031?
2030 means the message is too long for the queue. 2031 (MQRC_MSG_TOO_BIG_FOR_Q_MGR) means it is too long for the queue manager's MAXMSGL. Fix whichever limit is the smaller one.
Why did a client application get 2010 instead of 2030?
A client connection has its own limit, the MAXMSGL of the channel. When a message is bigger than the channel allows, the client usually sees 2010 (MQRC_DATA_LENGTH_ERROR) before the queue limit is ever checked.
Does segmentation work on z/OS?
No. IBM MQ for z/OS ignores MQMF_SEGMENTATION_ALLOWED, so messages must fit the queue and queue manager limits as they are.