Reference: JMS Topic Management
Listing subscriptions and messages JMS topics subscriptions can be listed using the listAllSubscriptions(), listDurableSubscriptions(), listNonDurableSubscriptions() methods. These methods return arrays of Object representing the subscriptions information (subscription name, client ID, durability, message count, etc.). It is also possible to list the JMS messages for a given subscription with the listMessagesForSubscription() method. Dropping subscriptions Durable subscriptions can be dropped from the topic using the dropDurableSubscription() method. Counting subscriptions messages The countMessagesForSubscription() method can be used to know the number of messages held for a given subscription (with an optional message selector to know the number of messages matching the selector)