Sun Java System Message Queue 4.3 Developer's Guide for JMX Clients

Operations

The cluster monitor MBean supports the operations shown in Table 3–79. The names of these operations are defined as static constants in the utility class ClusterOperations.

Table 3–79 Cluster Monitor Operations

Name 

Parameters 

Result Type 

Description 

getBrokerAddresses

None 

String[]

Addresses of brokers in cluster 

Each address specifies the host name and Port Mapper port number of a broker in the cluster, in the form hostName:portNumber.

Example:

    host1:3000


For conventional clusters, the list includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and inactive brokers in the cluster table stored in the HA database.

getBrokerIDs [HA clusters only]

None 

String[]

Broker identifiers of brokers in cluster

The list includes all active and inactive brokers in the cluster table stored in the HA database.

getBrokerInfoByAddress

brokerAddress (String)

CompositeData

Descriptive information about broker 

The desired broker is designated by its host name and Port Mapper port number (brokerAddress), in the form hostName:portNumber. The value returned is a JMX CompositeData object describing the broker; seeTable 3–80 for lookup keys used with this object.

getBrokerInfoByID

brokerID (String)

CompositeData

Descriptive information about broker 

The desired broker is designated by its broker identifier (brokerID). The value returned is a JMX CompositeData object describing the broker; seeTable 3–80 for lookup keys used with this object. For conventional clusters, the operation returns null.

getBrokerInfo

None 

CompositeData[]

Descriptive information about all brokers in cluster 

The value returned is an array of JMX CompositeData objects describing the brokers; see Table 3–80 for lookup keys used with these objects.

For conventional clusters, the array includes all brokers specified by the broker property imq.cluster.brokerlist. For HA clusters, it includes all active and inactive brokers in the cluster table stored in the HA database.

The LocalBrokerInfo and MasterBrokerInfo attributes and the getBrokerInfoByAddress, getBrokerInfoByID, and getBrokerInfo operations return objects implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3–80 are defined as static constants in the utility class BrokerClusterInfo for use with these objects.

Table 3–80 Lookup Keys for Cluster Monitor Information

Key 

Value Type 

Description 

Address

String

Broker address, in the form hostName:portNumber

Example:

    host1:3000


ID [HA clusters only]

String

Broker identifier

State

Integer

Current state of broker 

See Table 3–81 for possible values.

StateLabel

String

String representation of current broker state 

Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).

See Table 3–81 for possible values.

TakeoverBrokerID

String

Broker identifier of broker that has taken over this broker's persistent data store

NumMsgs

Long

Current number of messages stored in memory and persistent store

StatusTimestamp

Long

Time of last status update, in standard Java format (milliseconds since January 1, 1970, 00:00:00 UTC)

Used to determine whether a broker is running.  

The interval at which a broker updates its status can be configured with the broker property imq.cluster.monitor.interval.

Table 3–81 shows the possible values returned for the lookup keys State and StateLabel. These values are defined as static constants in the utility class BrokerState.

Table 3–81 Broker State Values

Value 

Utility Constant 

String Representation 

Meaning 

0

BrokerState.OPERATING

OPERATING

Broker is operating 

1

BrokerState.TAKEOVER_STARTED

TAKEOVER_STARTED

Broker has begun taking over persistent data store from another broker

2

BrokerState.TAKEOVER_COMPLETE

TAKEOVER_COMPLETE

Broker has finished taking over persistent data store from another broker

3

BrokerState.TAKEOVER_FAILED

TAKEOVER_FAILED

Attempted takeover has failed

4

BrokerState.QUIESCE_STARTED

QUIESCE_STARTED

Broker has begun quiescing 

5

BrokerState.QUIESCE_COMPLETE

QUIESCE_COMPLETE

Broker has finished quiescing 

6

BrokerState.SHUTDOWN_STARTED

SHUTDOWN_STARTED

Broker has begun shutting down 

7

BrokerState.BROKER_DOWN

BROKER_DOWN

Broker is down 

-1

BrokerState.UNKNOWN

UNKNOWN

Broker state unknown