user275880
user275880

Reputation: 31

how to check if there is any consumer to the queue on Ibm Mq

How can I check from IBM MQ UI that to a specific queue if there is any consumer present

Upvotes: 3

Views: 13732

Answers (2)

Joe Zitzelberger
Joe Zitzelberger

Reputation: 4263

Start your MQ app.

Select your queue for "DISPLAY".

On the first screen you will see "Use counts - Output ##### Input ##### ", those are your consumers.

Alternatively, you could do an MQINQuire and ask for those two fields.

Upvotes: 0

T.Rob
T.Rob

Reputation: 31852

From WMQ Explorer or any of the desktop client tools, look for an open input handle on the queue. In WMQ Explorer's default view the first two columns are the queue name and type. After that there are several columns with numbers. The first is queue depth. Next is the number of open input handles, then the number of open output handles. If you right-click on the queue name there is an option for Status. Selecting that will show you lots of details about the handles such as who has them open, what open options were used, the PID holding the handle, etc.

If you wanted to do this at the command line you would use runmqsc and the display qstatus command. For example:

echo 'dis qs(SYSTEM.ADMIN.COMMAND.QUEUE) type(handle) all' | runmqsc TESTQMGR

5724-H72 (C) Copyright IBM Corp. 1994, 2009.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager TESTQM.

AMQ8450: Display queue status details.
   QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE)       TYPE(HANDLE)
   APPLDESC( )
   APPLTAG(er V7\java\jre\bin\javaw.exe)
   APPLTYPE(USER)                          BROWSE(NO)
   CHANNEL( )                              CONNAME( )
   ASTATE(NONE)                            HSTATE(INACTIVE)
   INPUT(NO)                               INQUIRE(NO)
   OUTPUT(YES)                             PID(6236)
   QMURID(0.0)                             SET(NO)
   TID(*)
   URID(XA_FORMATID[00000000] XA_GTRID[] XA_BQUAL[])
   URTYPE(QMGR)                            USERID(T.Rob@IBM-02BE93E63E4)
AMQ8450: Display queue status details.
   QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE)       TYPE(HANDLE)
   APPLDESC( )
   APPLTAG(er V7\java\jre\bin\javaw.exe)
   APPLTYPE(USER)                          BROWSE(NO)
   CHANNEL( )                              CONNAME( )
   ASTATE(NONE)                            HSTATE(INACTIVE)
   INPUT(NO)                               INQUIRE(YES)
   OUTPUT(NO)                              PID(6236)
   QMURID(0.0)                             SET(NO)
   TID(*)
   URID(XA_FORMATID[00000000] XA_GTRID[] XA_BQUAL[])
   URTYPE(QMGR)                            USERID(T.Rob@IBM-02BE93E63E4)
AMQ8450: Display queue status details.
   QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE)       TYPE(HANDLE)
   APPLDESC(WebSphere MQ Command Server)
   APPLTAG(ebSphere MQ\bin\amqpcsea.exe)
   APPLTYPE(SYSTEM)                        BROWSE(NO)
   CHANNEL( )                              CONNAME( )
   ASTATE(NONE)                            HSTATE(ACTIVE)
   INPUT(EXCL)                             INQUIRE(YES)
   OUTPUT(NO)                              PID(5556)
   QMURID(0.0)                             SET(NO)
   TID(1)
   URID(XA_FORMATID[00000000] XA_GTRID[] XA_BQUAL[])
   URTYPE(QMGR)

1 MQSC commands read.
One command has a syntax error.
All valid MQSC commands were processed.

You can also do this programmatically from Java or C using PCF commands but since you specified "from the UI" I'm guessing this is not what you need.

The DIS QS command is described more fully here: http://bit.ly/WMQdisQS If you need the WMQ Explorer, that is here: http://bit.ly/SupportPacMQC7

Upvotes: 5

Related Questions