A Destination List Metrics Example

The source file for this code example is DestListMetrics.java.
This client application monitors the list of destinations on a broker by subscribing
to the topic mq.metrics.destination_list. The messages
that arrive contain information describing the destinations that currently
exist on the broker, such as destination name, destination type, and whether
the destination is temporary.

Notice how the metrics type is extracted and checked, and how the list
of destinations is extracted. By iterating through the map names in mapMsg and extracting the corresponding value (a hashtable), you can construct
a list of all the destinations and their related information.

(The map names can also be used to monitor a destination, but that is
not done in this particular example.)

Notice that from each extracted hashtable, the information on each destination
is extracted using the keys name, type,
and isTemporary. The extraction code from the previous
code example is reiterated here for your convenience.