Sun Java System Message Queue 4.3 Administration Guide

Broker Management

The Command utility cannot be used to start a broker; use the Broker utility (imqbrokerd) instead. Once the broker is started, you can use the imqcmd subcommands listed in Table 15–4 to manage and control it.

Table 15–4 Command Utility Subcommands for Broker Management



shutdown bkr [-b hostName:portNumber]

    [-time nSeconds]


Shut down broker

The -time option specifies the interval, in seconds, to wait before shutting down the broker. (The broker will not block, but will return immediately from the delayed shutdown request.) During the shutdown interval, the broker will not accept any new jms connections; admin connections will be accepted, and existing jms connections will continue to operate. A broker belonging to an enhanced cluster will not attempt to take over for any other broker during the shutdown interval.

The -nofailover option indicates that no other broker is to take over the persistent data of the one being shut down. [Applies only to broker clusters]

restart bkr [-b hostName:portNumber]

Restart broker

Shuts down the broker and then restarts it using the same options specified when it was originally started.  

pause bkr [-b hostName:portNumber]

Pause broker

See Pausing and Resuming a Broker for more information.

quiesce bkr [-b hostName:portNumber]

Quiesce broker

The broker will stop accepting new connections; existing connections will continue to operate.  

unquiesce bkr [-b hostName:portNumber]

Unquiesce broker

The broker will resume accepting new connections, returning to normal operation.  

resume bkr [-b hostName:portNumber]

Resume broker

takeover bkr -n brokerID


Initiate broker takeover

Before taking over a broker, you should first shut it down manually using the shutdown bkr subcommand with the -nofailover option. If the specified broker appears to be still running, takeover bkr will display a confirmation message (Do you want to take over for this broker?). The -f option suppresses this message and initiates the takeover unconditionally.

Note –

The takeover bkr subcommand is intended only for use in failed-takeover situations. You should use it only as a last resort, and not as a general way of forcibly taking over a running broker.

update bkr [-b hostName:portNumber]

    -o property1=value1

    [ [-o property2=value2] … ]

Set broker properties

See Chapter 16, Broker Properties Reference for information on broker properties.

reload cls

Reload cluster configuration

Forces all persistent information to be brought up to date.  

query bkr -b hostName:portNumber

List broker property values

For brokers belonging to a cluster, also lists cluster properties such as broker list, master broker (for conventional clusters), and cluster identifier (for enhanced clusters).

list bkr

List brokers in cluster

metrics bkr [-b hostName:portNumber]

    [-m metricType]

    [-int interval]

    [-msp numSamples]

Display broker metrics

The -m option specifies the type of metrics to display:

    ttl: Messages and packets flowing into and out of the broker

    rts: Rate of flow of messages and packets into and out of the broker per second

    cxn: Connections, virtual memory heap, and threads

Default value: ttl.

The -int option specifies the interval, in seconds, at which to display metrics. Default value: 5.

The -msp option specifies the number of samples to display. Default value: Unlimited (infinite).