Check that messages on the queue are available

If we have a large number of messages on the queue and the application is not processing any of those messages, check whether the messages on the queue are available to the application


About this task

Perform the following steps to investigate why the application is not processing messages from the queue:


Procedure

  1. Ensure that the application is not asking for a specific message ID or correlation ID when it should be processing all the messages on the queue.
  2. Although the current depth of the queue might show that there is an increasing number of messages on the queue, some messages on the queue might not be available to be got by an application, because they are not committed; the current depth includes the number of uncommitted MQPUTs of messages to the queue. Issue the following command:
    DISPLAY QSTATUS(Q1) TYPE(QUEUE) ALL
    
    In the output, look at the UNCOM field to see whether there are any uncommitted messages on the queue.
  3. If the application is attempting to get any messages from the queue, check whether the putting application is committing the messages correctly. Issue the following command to find out the names of applications that are putting messages to this queue:
    DISPLAY QSTATUS(Q1) TYPE(HANDLE) OPENTYPE(OUTPUT)
    
  4. Then issue the following command, inserting in appltag the APPLTAG value from the output of the previous command:
    DISPLAY CONN(*) WHERE(APPLTAG EQ appltag) UOWSTDA UOWSTTI
    
    This shows when the unit of work was started and will help you discover whether the application is creating a long running unit of work. If the putting application is a channel, you might want to investigate why a batch is taking a long time to complete.

Parent topic: Monitor queues