Question & Answer
Question
How can I find the name of the application that is subscribed to an MQ topic?
Answer
You can use a portion of the output from the MQSC DISPLAY TPSTATUS command, as input to the DISPLAY CONN command to identify the name of the application.
Note: In this scenario the following MQ sample program was used:
amqssub "sports/football"
From "runmqsc" issue the following commands:
1) Notice that there is 1 subscriber, but there are no explicit details on the application name.
DISPLAY TPSTATUS('sports/football') TYPE(sub)
AMQ8754: Display topic status details.
TOPICSTR(sports/football)
SUBID(414D5120514D5F414E47454C494C4C4F0D98994920001D04)
SUBUSER(rivera) RESMDATE(2009-02-16)
RESMTIME(11:45:25) LMSGDATE(2009-02-16)
LMSGTIME(11:48:43)
ACTCONN(414D5143514D5F414E47454C494C4C4F0D98994920001D01)
DURABLE(NO) SUBTYPE(API)
NUMMSGS(3)
Notice that in the above lines, the last 16 bytes of the ACTCONN are shown in "bold" typeface for illustration purposes. These bytes will be used in the next step.
2) Issue DISPLAY CONN to show more details on the application, which includes the program name (see the APPLTAG parameter which shows "amqssub.exe").
From the value of the ACTCONN (active connection) from the output in step 1, copy the last 16 bytes and paste it inside the parenthesis for:
DISPLAY CONN(right-most 16-bytes from ACTCONN)
DISPLAY CONN(0D98994920002901)
AMQ8276: Display Connection details.
CONN(0D98994920002901)
EXTCONN(414D5143514D5F414E47454C494C4C4F)
TYPE(CONN)
PID(6876) TID(1)
APPLTAG(ls\c\samples\bin\amqssub.exe) APPLTYPE(USER)
ASTATE(NONE) CHANNEL( )
CONNAME( ) CONNOPTS(MQCNO_SHARED_BINDING)
USERID(rivera) UOWLOG( )
UOWSTDA( ) UOWSTTI( )
UOWLOGDA( ) UOWLOGTI( )
URTYPE(QMGR)
EXTURID(XA_FORMATID[00000000] XA_GTRID[] XA_BQUAL[])
QMURID(0.0) UOWSTATE(NONE)
+++ end +++
Product Synonym
WMQ MQ MQSeries
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21375536