MQRC 2033: No matching message available
MQRC 2033 (MQRC_
Other names for this code
Also written as RC2033, reason code 2033, MQ 2033, MQ error 2033, MQRC_NO_MSG_AVAILABLE, 07F1, 0x07F1, no message available, MQJE001 Reason 2033, MQ queue empty 2033.
What it means
MQGET returns 2033 when nothing on the queue matches what it asked for. Without MQGMO_
This is the normal way a reader learns the queue is empty, and most programs handle it as end of input. It becomes a problem when you know a message was sent and the reader still gets 2033. Then the message is there but not available to this get, or it never arrived on this queue.
A message isn't available if it was put under syncpoint and not yet committed, if it has expired, or if it doesn't match the MsgId, CorrelId or other match options in the get. Messages in a group or segmented messages can also stay out of reach when options such as MQGMO_
Common causes
- The queue is empty and the program didn't wait, or waited less time than the sender needed.
- The sender put the message under syncpoint and hasn't committed yet, or backed it out.
- The program reuses the MQMD after a get without resetting MsgId and CorrelId to MQMI_
NONE and MQCI_ NONE. The next get then looks only for the message it already took. - The message expired. Messages past their Expiry time are discarded instead of returned.
- The message went somewhere else, such as another instance of a cluster queue, a remote queue definition, the transmission queue or the dead-letter queue.
- The get asks for a complete group or a complete segmented message, and not all parts have arrived.
How to find the problem
- Check the queue directly with
DISPLAY QLOCAL(ORDERS.IN) CURDEPTHandDISPLAY QSTATUS(ORDERS.. A depth above zero with uncommitted changes points to a sender that hasn't committed.IN) TYPE(QUEUE) UNCOM - Browse the queue with
amqsbcgordmpmqmsgon distributed MQ, or a browse tool on z/OS, and compare MsgId, CorrelId and Expiry with what the get asks for. - Log the MQMD and MQGMO the program passes. Look at MatchOptions, MsgId, CorrelId, WaitInterval and the group options.
- If the queue is empty, follow the message path. Check the sender's target queue, the transmission queue depth, channel status with
DISPLAY CHSTATUS(*)and the dead-letter queue. - In a cluster, check depth on every instance of the queue. Workload balancing can send the message to a different queue manager.
How to fix it
- If 2033 means the queue is empty, treat it as normal and end the loop or wait again.
- Reset MsgId to MQMI_
NONE and CorrelId to MQCI_ NONE before each get that shouldn't match on them, or use MatchOptions of MQMO_ NONE. - Make sure the sender commits. Check that MQCMIT, EXEC CICS SYNCPOINT or the JMS commit really runs.
- Set a WaitInterval that fits how long the reply can take, for request and reply designs in particular.
- If messages expire before they are read, raise the Expiry the sender sets or speed up the reader.
What it looks like
MQJE001: Completion Code '2', Reason '2033'.
IBM documentation
IBM documentation: MQRC 2033. Use the documentation for your installed release.
Related codes
Questions
Is MQRC 2033 an error?
Usually not. It is how MQGET reports an empty queue or a wait that ended without a match. It only needs work when you expected a message to be there.
Why does the queue show a depth but MQGET returns 2033?
The messages on it don't match this get, or they are uncommitted. Check CURDEPTH against UNCOM, and check the MsgId and CorrelId the program passes.
Is the completion code for 2033 a warning or a failure?
For MQGET it is MQCC_FAILED. Some administration interface calls such as mqExecute can return 2033 with a warning when only part of the expected replies arrived.