Sun GlassFish Message Queue 4.4 Administration Guide

Viewing Physical Destination Information

To list the physical destinations on a broker, use the imqcmd list dst subcommand:

   imqcmd list dst  -b hostName:portNumber  [-t destType]  [-tmp]

This lists all physical destinations on the broker identified by hostName and portNumber of the type (queue or topic) specified by destType. If the -t option is omitted, both queues and topics are listed. For example, the following command lists all physical destinations on the broker running on host myHost at port number 4545:

   imqcmd list dst  -b myHost:4545

Note –

The list of queue destinations always includes the dead message queue (mq.sys.dmq) in addition to any other queue destinations currently existing on the broker.

If you specify the -tmp option, temporary destinations are listed as well. These are destinations created by clients, normally for the purpose of receiving replies to messages sent to other clients.

The imqcmd query dst subcommand displays information about a single physical destination:

   imq query dst  -t destType  -n destName

For example, the following command displays information about the queue destination curlyQueue:

   imqcmd query dst  -t q  -n curlyQueue  -u admin

Example 7–3 shows an example of the resulting output. You can use the imqcmd update dst subcommand (see Updating Physical Destination Properties) to change the value of any of the properties listed.

Example 7–3 Physical Destination Information Listing

Destination Name    Destination Type
------------------------------------    Topic

On the broker specified by:

Host         Primary Port
localhost    7676

Destination Name              
Destination Type                        Topic
Destination State                       RUNNING
Created Administratively                true

Current Number of Messages                
   Actual                               0
   Remote                               0
   Held in Transaction                  0
Current Message Bytes                     
   Actual                               0
   Remote                               0
   Held in Transaction                  0
Current Number of Producers             0
Current Number of Producer Wildcards    0
Current Number of Consumers             1
Current Number of Consumer Wildcards    1
   large.*.circle  (1)                                                               

Max Number of Messages                  unlimited (-1)
Max Total Message Bytes                 unlimited (-1)
Max Bytes per Message                   unlimited (-1)
Max Number of Producers                 100
Limit Behavior                          REJECT_NEWEST
Consumer Flow Limit                     1000
Is Local Destination                    false
Use Dead Message Queue                  true
XML schema validation enabled           false
XML schema URI List                     -
Reload XML schema on failure            false

For destinations in a broker cluster, it is often helpful to know how many messages in a destination are local (produced to the local broker) and how many are remote (produced to a remote broker). Hence, imqcmd query dst reports, in addition to the number and total message bytes of messages in the destination, the number and total bytes of messages that are sent to the destination from remote brokers in the cluster.

For topic destinations, imqcmd query dst reports the number of publishers that are wildcard publishers (including their corresponding symbolic destination names) and the number of subscribers that are wildcard subscribers (including their symbolic destination names), if any.

To display metrics information about a physical destination, use the imqcmd metrics dst subcommand:

   imqcmd metrics dst   -t destType  -n destName
                       [-m metricType]
                       [-int interval]
                       [-msp numSamples]

The -m option specifies the type of metric information to display:

The -int and -msp options specify, respectively, the interval (in seconds) at which to display the metrics and the number of samples to display in the output. The default values are 5 seconds and an unlimited number of samples.

For example, the following command displays cumulative totals for messages and packets handled by the queue destination curlyQueue:

   imqcmd metrics dst  -t q  -n curlyQueue  -m ttl  -u admin

Example 7–4 shows an example of the resulting output.

Example 7–4 Physical Destination Metrics Listing

   Msgs        Msg Bytes          Msg Count         Total Msg Bytes (k)     Largest
 In   Out     In       Out    Current  Peak  Avg  Current   Peak     Avg    Msg (k)
3128  3066  1170102  1122340    128    409   29     46      145      10       < 1
4858  4225  1863159  1635458    144    201   33     53      181      42       < 1
2057  1763   820804   747200     84    377   16     71      122      79       < 1

For a more detailed description of the use of the Command utility to report physical destination metrics, see Physical Destination Metrics.