2053 0x00000805 MQRC_Q_FULL

When working with MQ we should make sure that we have Queue Monitoring in place . Also we have to plan the Queue maxdepth attribute based on the Load of message generation and consumption rate . MQ health is good if All channels are RUNNING and Curdepth is 0 always .Means Application are processing all the messages that comes in to the queue .We will see how to check the maxdepth ,curdepth ,What happens if the queue is full .How to check the MQ reason code if we get any MQ error .

[mqm@ip-172-31-14-154 tmp]$ echo " dis ql(TESTQ) curdepth maxdepth " |runmqsc IBMMQ.QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2020.
Starting MQSC for queue manager IBMMQ.QM1.

     1 :  dis ql(TESTQ) curdepth maxdepth 
AMQ8409I: Display Queue details.
   QUEUE(TESTQ)                            TYPE(QLOCAL)
   CURDEPTH(0)                             MAXDEPTH(5000)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
[mqm@ip-172-31-14-154 tmp]$ 

In the above output we have a local queue with Max capacity 5000 and there are no message at the moment . We will push 5000 message using the sample program . Use below script to pump 5000 message to the TESTQ.

mqm@ip-172-31-14-154 tmp]$ cat put.sh 
 #!/bin/bash
 for i in `seq 5000` ; do
  echo "Sending $i message"
  echo "Test MSG $i" |/opt/mqm/samp/bin/amqsput TESTQ IBMMQ.QM1 >/dev/null 2>&1
 done 
[mqm@ip-172-31-14-154 tmp]$ 

After sending 5000 message then check curdepth

[mqm@ip-172-31-14-154 tmp]$ echo " dis ql(TESTQ) curdepth maxdepth " |runmqsc IBMMQ.QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2020.
Starting MQSC for queue manager IBMMQ.QM1.


     1 :  dis ql(TESTQ) curdepth maxdepth 
AMQ8409I: Display Queue details.
   QUEUE(TESTQ)                            TYPE(QLOCAL)
   CURDEPTH(5000)                          MAXDEPTH(5000)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
[mqm@ip-172-31-14-154 tmp]$ 

Now both max and curdepth are same . Means Queue is full .it cannot take any more message . Let us see what happen by sending 1 message

[mqm@ip-172-31-14-154 tmp]$ /opt/mqm/samp/bin/amqsput TESTQ IBMMQ.QM1
Sample AMQSPUT0 start
target queue is TESTQ
5001 Message i am tryign to send 
MQPUT ended with reason code 2053
Sample AMQSPUT0 end
[mqm@ip-172-31-14-154 tmp]$ 

We got the error and the reason code is 2053 . Run mqrc 2053 on the termial for code description .

[mqm@ip-172-31-14-154 tmp]$ mqrc 2053
      2053  0x00000805  MQRC_Q_FULL
[mqm@ip-172-31-14-154 tmp]$ 

MQRC_Q_FULL states the queue is full . Since the application is directly trying to put the message to QUEUE and due to full application cannot put anymore message .But if the queue is full during point to point setup or Cluster setup where channels involved then the message will go to DEAD LETTER QUEUE .

Ex : Remote Local Queue is full or Xmitq is full at source QMGR .

We can increate the maxdepth of the queue to take some more messages

mqm@ip-172-31-14-154 errors]$ echo " alter ql(TESTQ) MAXDEPTH(10000)" |runmqsc IBMMQ.QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2020.
Starting MQSC for queue manager IBMMQ.QM1.

     1 :  alter ql(TESTQ) MAXDEPTH(10000)
AMQ8008I: IBM MQ queue changed.
       : 
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
[mqm@ip-172-31-14-154 errors]$

Now maxdepth increased to 10000 . Try to put message and see if we still get error .

[mqm@ip-172-31-14-154 errors]$ /opt/mqm/samp/bin/amqsput TESTQ IBMMQ.QM1
Sample AMQSPUT0 start
target queue is TESTQ
5001
5002

Sample AMQSPUT0 end
[mqm@ip-172-31-14-154 errors]$

If Application want to clear the queue then we can clear it by running below command .

[mqm@ip-172-31-14-154 errors]$ runmqsc IBMMQ.QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2020.
Starting MQSC for queue manager IBMMQ.QM1.

CLEAR QLOCAL(TESTQ)
     1 : CLEAR QLOCAL(TESTQ)
AMQ8022I: IBM MQ queue cleared.
DISPLAY QLOCAL(TESTQ) CURDEPTH
     2 : DISPLAY QLOCAL(TESTQ) CURDEPTH
AMQ8409I: Display Queue details.
   QUEUE(TESTQ)                            TYPE(QLOCAL)
   CURDEPTH(0)                          
end
     3 : end
2 MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.
[mqm@ip-172-31-14-154 errors]$ 

If we Get error that the queue is in use then we cannot clear using CLEAR command . During this situation we can run amqsget . make sure there is not application posting message during this time . Otherwise amqsget will consume inflight message also .

We have seen how to check maxdepth ,curdepth , increase maxdepth ,when error happens how to check the error code description and then how to handle the situation .

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *