Are the messages on the queue available?

If there is a large number of messages on the queue and your application is not processing any of them, do the following:

  1. Ensure that your 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 your 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 UOWSTATI
    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, see Does a batch take a long time to complete?