+

Search Tips | Advanced Search

Display attributes of subscriptions

We can use the DISPLAY SUB command to display configured attributes of any subscription known to the queue manager.

For example, use:
DISPLAY SUB(ORANGE)
We can selectively display attributes by specifying them individually. For example:
DISPLAY SUB(ORANGE) +
        SUBID +
        TOPICSTR +
        DURABLE
This command displays the three specified attributes as follows:
AMQ8096: IBM MQ subscription inquired.
     SUBID(414D5120414141202020202020202020EE921E4E20002A03)
     SUB(ORANGE)                                                             TOPICSTR(ORANGE)
     DURABLE(YES)

TOPICSTR is the resolved topic string on which this subscriber is operating. When a subscription is defined to use a topic object the topic string from that object is used as a prefix to the topic string provided when making the subscription. SUBID is a unique identifier assigned by the queue manager when a subscription is created. This is a useful attribute to display because some subscription names might be long or in a different character sets for which it might become impractical.

An alternate method for displaying subscriptions is to use the SUBID:
DISPLAY SUB +
        SUBID(414D5120414141202020202020202020EE921E4E20002A03) +
        TOPICSTR + 
        DURABLE
This command gives the same output as before:
AMQ8096: IBM MQ subscription inquired.
 SUBID(414D5120414141202020202020202020EE921E4E20002A03)
   SUB(ORANGE)                                                             TOPICSTR(ORANGE)
   DURABLE(YES)

Proxy subscriptions on a queue manager are not displayed by default. To display them specify a SUBTYPE of PROXY or ALL.

We can use the DISPLAY SBSTATUS command to display the Runtime attributes. For example, use the command:
DISPLAY SBSTATUS(ORANGE) NUMMSGS
The following output is displayed:
AMQ8099: IBM MQ subscription status inquired.
   SUB(ORANGE)
   SUBID(414D5120414141202020202020202020EE921E4E20002A03)
   NUMMSGS(0)
When you define an administrative subscription, it takes any attributes that we do not specify explicitly from the default subscription, which is called SYSTEM.DEFAULT.SUB. To see what these default attributes are, use the following command:
DISPLAY SUB (SYSTEM.DEFAULT.SUB)
Parent topic: Work with subscriptions


Related information

Last updated: 2020-10-04