Sun GlassFish Message Queue 4.4 Developer's Guide for Java Clients

ProcedureTo Test a Broker

One simple way to check the broker startup is by using the Message Queue command utility (imqcmd) to display information about the broker:

  1. In a separate terminal window, change to the directory containing Message Queue executables (see the table shown at the beginning of the section To Start a Broker).

  2. Run imqcmd with the following arguments:


    imqcmd query bkr -u admin

    Supply the default password of admin when prompted to do so. The output displayed should be similar to that shown in the next example.


Example 1–1 Output From Testing a Broker


% imqcmd query bkr -u admin

Querying the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    7676

Version                                            3.6
Instance Name                                      imqbroker
Primary Port                                       7676

Current Number of Messages in System               0
Current Total Message Bytes in System              0

Max Number of Messages in System                   unlimited (-1)
Max Total Message Bytes in System                  unlimited (-1)
Max Message Size                                   70m


Auto Create Queues                                 true
Auto Create Topics                                 true
Auto Created Queue Max Number of Active Consumers  1
Auto Created Queue Max Number of Backup Consumers  0

Cluster Broker List (active)                        
Cluster Broker List (configured)                   
Cluster Master Broker                               
Cluster URL                                         

Log Level                                          INFO
Log Rollover Interval (seconds)                    604800
Log Rollover Size (bytes)                          unlimited (-1)

Successfully queried the broker.

Current Number of Messages in System        0