Brokers
This section describes the MBeans used for managing brokers:
The following subsections describe each of these MBeans in detail.
Broker Configuration
The broker configuration MBean is used for configuring a broker. There is one such MBean
for each broker.
Object Name
The broker configuration MBean has the following object name:
com.sun.messaging.jms.server:type=Broker,subtype=Config
A string representing this object name is defined as a static constant
BROKER_CONFIG_MBEAN_NAME in the utility class MQObjectName.
Attributes
The broker configuration MBean has the attributes shown in Table 3-1. The names
of these attributes are defined as static constants in the utility class BrokerAttributes.
Table 3-1 Broker Configuration Attributes
|
|
|
|
|
String |
No |
Broker identifier Must be a unique alphanumeric string of no more than n
- 13 characters, where n is the maximum table name length allowed by the
database. No two running brokers may have the same broker identifier. For brokers
using a JDBC-based persistent data store, this string is appended to the names
of all database tables to make them unique in the case where more
than one broker instance is using the same database. If a database is
not used as the persistent data store, the value of this attribute is
null.
Note - For high-availability brokers, database table names use the ClusterID attribute (see
Table 3-74) instead.
|
|
String |
No |
Broker version |
|
String |
No |
Broker instance name Example:
|
|
Integer |
Yes |
Port number of Port Mapper |
|
Operations
The broker configuration MBean supports the operations shown in Table 3-2. The names
of these operations are defined as static constants in the utility class BrokerOperations.
Table 3-2 Broker Configuration Operations
|
|
|
|
|
nofailover ( Boolean) time (Long) |
None |
Shut down broker If nofailover is false or null, another
broker will attempt to take over for this broker when it shuts down;
this applies only to brokers in a high-availability (HA) cluster. If nofailover is
true, no such takeover attempt will occur. The time parameter specifies the
interval, in seconds, before the broker actually shuts down; for immediate shutdown, specify
0 or null. |
|
None |
None |
Shut down broker immediately If the broker is part of
a high-availability (HA) cluster, another broker will attempt to take over for it.
Equivalent to shutdown(Boolean.FALSE, new Long(0)). |
|
None |
None |
Restart broker |
|
None |
None |
Quiesce broker The broker will refuse any new connections;
existing connections will continue to be served. |
|
None |
None |
Unquiesce broker The broker will again accept
new connections. |
|
brokerID (String) |
None |
Initiate takeover from specified broker The desired broker
is designated by its broker identifier (brokerID). |
|
propertyName (String) |
String |
Get value of configuration
property The desired property is designated by its name (propertyName) |
|
None |
None |
Reset metrics Resets to zero
all metrics in monitor MBeans that track cumulative, peak, or average counts. The
following attributes are affected: |
|
|
|
Service monitor
NumConnectionsOpened
NumConnectionsRejected
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
NumPktsIn
NumPktsOut
PktBytesIn
PktBytesOut
|
|
|
|
Service manager monitor
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
NumPktsIn
NumPktsOut
PktBytesIn
PktBytesOut
|
|
|
|
Connection manager monitor
NumConnectionsOpened
NumConnectionsRejected
|
|
|
|
Destination monitor
PeakNumConsumers
AvgNumConsumers
PeakNumActiveConsumers
AvgNumActiveConsumers
PeakNumBackupConsumers
AvgNumBackupConsumers
PeakNumMsgs
AvgNumMsgs
NumMsgsIn
NumMsgsOut
MsgBytesIn
MsgBytesOut
PeakMsgBytes
PeakTotalMsgBytes
AvgTotalMsgBytes
|
|
|
|
Transaction manager monitor
NumTransactionsCommitted
NumTransactionsRollback
|
|
1HA clusters only
Notification
The broker configuration MBean supports the notification shown in Table 3-3.
Table 3-3 Broker Configuration Notification
Broker Monitor
The broker monitor MBean is used for monitoring a broker. There is one such MBean
for each broker.
Object Name
The broker monitor MBean has the following object name:
com.sun.messaging.jms.server:type=Broker,subtype=Monitor
A string representing this object name is defined as a static constant
BROKER_MONITOR_MBEAN_NAME in the utility class MQObjectName.
Attributes
The broker monitor MBean has the attributes shown in Table 3-4. The names
of these attributes are defined as static constants in the utility class BrokerAttributes.
Table 3-4 Broker Monitor Attributes
|
|
|
|
|
String |
No |
Broker identifier Must be a unique alphanumeric string of no more than n
- 13 characters, where n is the maximum table name length allowed by the
database. No two running brokers may have the same broker identifier. For brokers
using a JDBC-based persistent data store, this string is appended to the names
of all database tables to make them unique in the case where more
than one broker instance is using the same database. If a database is
not used as the persistent data store, the value of this attribute is
null.
Note - For high-availability brokers, database table names use the ClusterID attribute (see
Table 3-79) instead.
|
|
String |
No |
Broker version |
|
String |
No |
Broker instance name |
|
Integer |
No |
Port number of Port Mapper |
|
String |
No |
Current broker resource
state:
green: < 80% memory utilization
yellow: 80–90% memory utilization
orange: 90–98% memory utilization
red: > 98% memory utilization
Note - The threshold values shown are the default thresholds for triggering the various
states; these can be changed by setting the broker configuration properties
imq.green.threshold
imq.yellow.threshold
imq.orange.threshold
imq.red.threshold
|
|
Boolean |
No |
Is broker
embedded (started from within another process)? |
|
Notifications
The broker monitor MBean supports the notifications shown in Table 3-5. These notifications
are instances of the Message Queue JMX classes BrokerNotification and ClusterNotification, and their names
are defined as static constants in those classes.
Table 3-5 Broker Monitor Notifications
|
|
|
|
BrokerNotification.BROKER_SHUTDOWN_START |
Broker has begun
shutting down |
|
BrokerNotification.BROKER_QUIESCE_START |
Broker has begun quiescing |
mq.broker.quiesce.complete |
BrokerNotification.BROKER_QUIESCE_COMPLETE |
Broker has finished quiescing |
mq.broker.takeover.start1 |
BrokerNotification.BROKER_TAKEOVER_START |
Broker has begun
taking over persistent data store from another broker |
mq.broker.takeover.complete1 |
BrokerNotification.BROKER_TAKEOVER_COMPLETE |
Broker has finished taking over
persistent data store from another broker |
|
BrokerNotification.BROKER_TAKEOVER_FAIL |
Attempted takeover has failed |
mq.broker.resource.state.change |
BrokerNotification.BROKER_RESOURCE_STATE_CHANGE |
Broker’s resource state has
changed |
|
ClusterNotification.CLUSTER_BROKER_JOIN |
Broker has joined a cluster |
|
1HA clusters only
Table 3-6 shows the methods defined in class BrokerNotification for obtaining details about a broker
monitor notification. See Table 3-84 for the corresponding methods of class ClusterNotification.
Table 3-6 Data Retrieval Methods for Broker Monitor Notifications
|
|
|
|
String |
|
|
String |
Broker address, in the form hostName:portNumberExample:
|
|
String |
Broker identifier of
broker being taken over |
|
String |
Broker’s previous resource state:
green: < 80% memory utilization
yellow: 80–90% memory utilization
orange: 90–98% memory utilization
red: > 98% memory utilization
Note - The threshold values shown are
the default thresholds for triggering the various states; these can be changed by
setting the broker configuration properties
imq.green.threshold
imq.yellow.threshold
imq.orange.threshold
imq.red.threshold
|
|
String |
Broker’s new resource state (see getOldResourceState, above, for possible
values) |
|
MemoryUsage |
Broker’s current heap memory usage The value returned is an object of class
MemoryUsage (defined in the package java.lang.management). |
|
1HA clusters only