Checking messages on a subscription
When a subscription is defined it is associated with a queue. Published messages matching this subscription are put to this queue. Use MQSC commands to check for messages currently queued for a subscription.
Before you begin
Note: The steps in this task require you to run MQSC commands. How you do this varies by platform. See Administering IBM® MQ using MQSC commands.
About this task
Note that the following MQSC commands show only those subscriptions that received messages.
To check for messages currently queued for a subscription perform the following steps:
Procedure
-
To check for messages queued for a subscription type
DISPLAY SBSTATUS(sub_name) NUMMSGS, see Displaying attributes of subscriptions. -
If the NUMMSGS value is greater than zero identify the queue associated with
the subscription by typing
DISPLAY SUB(sub_name)DEST. - Using the name of the queue returned you can view the messages by following the technique described in Browsing queues with the sample program.