
If you are not sure what a Topic is, check out our Getting Started tutorial. These examples are based on Linux.
In this example, MANAGER01 is the name of the queue manager. If you are not sure the name of the queue manager, use the dspmq command to display the queue managers. This assumes that the "mqm" users .bash_profile has been updated to have PATH=$PATH:<root installation directory>/bin.
Display all of the subscriptions in the queue manager.
echo "display sub (*)" | runmqsc MANAGER01
Following is an example of what will be displayed.
AMQ8096I: IBM MQ subscription inquired.
SUBID(100001)
SUB(Subscrption001)
AMQ8096I: IBM MQ subscription inquired.
SUBID(100002)
SUB(Subscrption002)
The all flag can be used to return more details for each subscription.
echo "display sub (*) all" | runmqsc MANAGER01
Something like this should be returned for each subscription.
SUBID(100001)
SUB(Subscription001)
TOPICSTR(path/to/topic)
TOPICOBJ( ) DISTYPE(RESOLVED)
DEST(SYSTEM.MANAGED.DURABLE.123456)
DESTQMGR(MANAGER001) PUBAPPID( )
SELECTOR( ) SELTYPE(NONE)
USERDATA(Shared Subscription)
PUBACCT(0000000000000000000000000000000000000000000000000000000000000000)
DESTCORL(100001)
DESTCLAS(MANAGED) DURABLE(YES)
EXPIRY(UNLIMITED) PSPROP(MSGPROP)
PUBPRTY(ASPUB) REQONLY(NO)
SUBSCOPE(ALL) SUBLEVEL(1)
SUBTYPE(API) VARUSER(ANY)
WSCHEMA(TOPIC) SUBUSER(john.doe)
CRDATE(2020-01-07) CRTIME(21:43:48)
ALTDATE(2020-09-15) ALTTIME(00:00:24)
To display the configuration of a particular subscription.
echo "display sub ('Subscrption001')" | runmqsc MANAGER01
Following is an example of what will be displayed.
SUBID(100001)
SUB(Subscription001)
TOPICSTR(path/to/topic)
TOPICOBJ( ) DISTYPE(RESOLVED)
DEST(SYSTEM.MANAGED.DURABLE.123456)
DESTQMGR(MANAGER001) PUBAPPID( )
SELECTOR( ) SELTYPE(NONE)
USERDATA(Shared Subscription)
PUBACCT(0000000000000000000000000000000000000000000000000000000000000000)
DESTCORL(100001)
DESTCLAS(MANAGED) DURABLE(YES)
EXPIRY(UNLIMITED) PSPROP(MSGPROP)
PUBPRTY(ASPUB) REQONLY(NO)
SUBSCOPE(ALL) SUBLEVEL(1)
SUBTYPE(API) VARUSER(ANY)
WSCHEMA(TOPIC) SUBUSER(john.doe)
CRDATE(2020-01-07) CRTIME(21:43:48)
ALTDATE(2020-09-15) ALTTIME(00:00:24)
Did you find this article helpful?
If so, consider buying me a coffee over at