Message Queue MBean Reference

Previous Next Contents

The script content on this page is for navigation purposes only and does not alter the content in any way.

3 Message Queue MBean Reference

This chapter describes the JMX MBeans that allow you to configure and monitor a Message Queue broker. It consists of the following sections:

Brokers

This section describes the MBeans used for managing brokers:

  • The broker configuration MBean configures a broker.

  • The broker monitor MBean monitors a broker.

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

Name Type Settable? Description

BrokerID

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.

Version

String

No

Broker version

InstanceName

String

No

Broker instance name

Example:

imqbroker

Port

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

Name Parameters Result Type Description

shutdown

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.

shutdown

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``))`.

restart

None

None

Restart broker

quiesce

None

None

Quiesce broker

The broker will refuse any new connections; existing connections will continue to be served.

unquiesce

None

None

Unquiesce broker

The broker will again accept new connections.

`takeover`Foot 1 

brokerID (String)

None

Initiate takeover from specified broker

The desired broker is designated by its broker identifier (brokerID).

getProperty

propertyName (String)

String

Get value of configuration property

The desired property is designated by its name (propertyName)

resetMetrics

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

Footnote 1 HA clusters only

Notification

The broker configuration MBean supports the notification shown in Table 3-3.

Table 3-3 Broker Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

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

Name Type Settable? Description

BrokerID

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.

Version

String

No

Broker version

InstanceName

String

No

Broker instance name

Port

Integer

No

Port number of Port Mapper

ResourceState

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

Embedded

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

Name Utility Constant Description

mq.broker.shutdown.start

BrokerNotification`.``BROKER_SHUTDOWN_START`

Broker has begun shutting down

mq.broker.quiesce.start

BrokerNotification`.``BROKER_QUIESCE_START`

Broker has begun quiescing

mq.broker.quiesce.complete

BrokerNotification`.``BROKER_QUIESCE_COMPLETE`

Broker has finished quiescing

`mq.broker.takeover.start`Foot 1 

BrokerNotification`.``BROKER_TAKEOVER_START`

Broker has begun taking over persistent data store from another broker

`mq.broker.takeover.complete`Footref 1

BrokerNotification`.``BROKER_TAKEOVER_COMPLETE`

Broker has finished taking over persistent data store from another broker

`mq.broker.takeover.fail`Footref 1

BrokerNotification`.``BROKER_TAKEOVER_FAIL`

Attempted takeover has failed

mq.broker.resource.state.change

BrokerNotification`.``BROKER_RESOURCE_STATE_CHANGE`

Broker’s resource state has changed

mq.cluster.broker.join

ClusterNotification`.``CLUSTER_BROKER_JOIN`

Broker has joined a cluster

Footnote 1 HA 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

Method Result Type Description

getBrokerID

String

Broker identifier

getBrokerAddress

String

Broker address, in the form hostName`:`portNumber

Example:

host1:3000

`getFailedBrokerID`Foot 1 

String

Broker identifier of broker being taken over

getOldResourceState

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

getNewResourceState

String

Broker’s new resource state (see getOldResourceState, above, for possible values)

getHeapMemoryUsage

MemoryUsage

Broker’s current heap memory usage

The value returned is an object of class MemoryUsage (defined in the package java.lang.management).

Footnote 1 HA clusters only

Connection Services

This section describes the MBeans used for managing connection services:

  • The service configuration MBean configures a connection service.

  • The service monitor MBean monitors a connection service.

  • The service manager configuration MBean manages service configuration MBeans.

  • The service manager monitor MBean manages service monitor MBeans.

The following subsections describe each of these MBeans in detail.

Service Configuration

The service configuration MBean is used for configuring a connection service. There is one such MBean for each service.

Object Name

The service configuration MBean has an object name of the following form:

`com.sun.messaging.jms.server:type=Service,subtype=Config,name=`serviceName

where serviceName is the name of the connection service (see Table 3-7). The utility class MQObjectName provides a static method, createServiceConfig, for constructing object names of this form.

Table 3-7 Connection Service Names for Service Configuration MBeans

Service Name Service Type Protocol Type

jms

Normal

TCP

ssljms

Normal

TLS (SSL-based security)

httpjms

Normal

HTTP

httpsjms

Normal

HTTPS (SSL-based security)

admin

Admin

TCP

ssladmin

Admin

TLS (SSL-based security)

Attributes

The service configuration MBean has the attributes shown in Table 3-8. The names of these attributes are defined as static constants in the utility class ServiceAttributes.

Table 3-8 Service Configuration Attributes

Name Type Settable? Description

Name

String

No

Service name

See Table 3-7 for possible values.

Port

Integer

Yes

Port number (jms, ssljms, admin, and ssladmin services only)

A value of 0 specifies that the port is to be dynamically allocated by the Port Mapper; to learn the actual port currently used by the service, use the Port attribute of the service monitor MBean.

MinThreads

Integer

Yes

Minimum number of threads assigned to service

Must be greater than 0.

MaxThreads

Integer

Yes

Maximum number of threads assigned to service

Must be greater than or equal to MinThreads.

ThreadPoolModel

String

No

Threading model for thread pool management:

  • dedicated: Two dedicated threads per connection, one for incoming and one for outgoing messages

  • shared: Connections processed by shared thread when sending or receiving messages (jms and admin services only)

Operations

The service configuration MBean supports the operations shown in Table 3-9. The names of these operations are defined as static constants in the utility class ServiceOperations.

Table 3-9 Service Configuration Operations

Name Parameters Result Type Description

pause

None

None

Pause service (jms, ssljms, httpjms, and httpsjms services only)

resume

None

None

Resume service (jms, ssljms, httpjms, and httpsjms services only)

Notification

The service configuration MBean supports the notification shown in Table 3-10.

Table 3-10 Service Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

Service Monitor

The service monitor MBean is used for monitoring a connection service. There is one such MBean for each service.

Object Name

The service monitor MBean has an object name of the following form:

`com.sun.messaging.jms.server:type=Service,subtype=Monitor,name=`serviceName

where serviceName is the name of the connection service (see Table 3-11). The utility class MQObjectName provides a static method, createServiceMonitor, for constructing object names of this form.

Table 3-11 Connection Service Names for Service Monitor MBeans

Service Name Service Type Protocol Type

jms

Normal

TCP

ssljms

Normal

TLS (SSL-based security)

httpjms

Normal

HTTP

httpsjms

Normal

HTTPS (SSL-based security)

admin

Admin

TCP

ssladmin

Admin

TLS (SSL-based security)

Attributes

The service monitor MBean has the attributes shown in Table 3-12. The names of these attributes are defined as static constants in the utility class ServiceAttributes.

Table 3-12 Service Monitor Attributes

Name Type Settable? Description

Name

String

No

Service name

See Table 3-11 for possible values.

Port

Integer

No

Port number currently used by service

State

Integer

No

Current state

See Table 3-13 for possible values.

StateLabel

String

No

String representation of current state:

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

See Table 3-13 for possible values.

NumConnections

Integer

No

Current number of connections

NumConnectionsOpened

Long

No

Cumulative number of connections opened since broker started

NumConnectionsRejected

Long

No

Cumulative number of connections rejected since broker started

NumActiveThreads

Integer

No

Current number of threads actively handling connections

NumProducers

Integer

No

Current number of message producers

NumConsumers

Integer

No

Current number of message consumers

NumMsgsIn

Long

No

Cumulative number of messages received since broker started

NumMsgsOut

Long

No

Cumulative number of messages sent since broker started

MsgBytesIn

Long

No

Cumulative size in bytes of messages received since broker started

MsgBytesOut

Long

No

Cumulative size in bytes of messages sent since broker started

NumPktsIn

Long

No

Cumulative number of packets received since broker started

NumPktsOut

Long

No

Cumulative number of packets sent since broker started

PktBytesIn

Long

No

Cumulative size in bytes of packets received since broker started

PktBytesOut

Long

No

Cumulative size in bytes of packets sent since broker started

Table 3-13 shows the possible values for the State and StateLabel attributes. These values are defined as static constants in the utility class ServiceState.

Table 3-13 Connection Service State Values

Value Utility Constant String Representation Meaning

0

ServiceState`.``RUNNING`

RUNNING

Service running

1

ServiceState`.``PAUSED`

PAUSED

Service paused

2

ServiceState`.``QUIESCED`

QUIESCED

Service quiesced

-1

ServiceState`.``UNKNOWN`

UNKNOWN

Service state unknown

Operations

The service monitor MBean supports the operations shown in Table 3-14. The names of these operations are defined as static constants in the utility class ServiceOperations.

Table 3-14 Service Monitor Operations

Name Parameters Result Type Description

getConnections

None

ObjectName`[]`

Object names of connection monitor MBeans for all current connections

getProducerIDs

None

String`[]`

Producer identifiers of all current message producers

getConsumerIDs

None

String`[]`

Consumer identifiers of all current message consumers

Notifications

The service monitor MBean supports the notifications shown in Table 3-15. These notifications are instances of the Message Queue JMX classes ServiceNotification and ConnectionNotification, and their names are defined as static constants in those classes.

Table 3-15 Service Monitor Notifications

Name Utility Constant Description

mq.service.pause

ServiceNotification`.``SERVICE_PAUSE`

Service paused

mq.service.resume

ServiceNotification`.``SERVICE_RESUME`

Service resumed

mq.connection.open

ConnectionNotification`.``CONNECTION_OPEN`

Connection opened

mq.connection.reject

ConnectionNotification`.``CONNECTION_REJECT`

Connection rejected

mq.connection.close

ConnectionNotification`.``CONNECTION_CLOSE`

Connection closed

Table 3-16 shows the method defined in class ServiceNotification for obtaining details about a service monitor notification. See Table 3-31 for the corresponding methods of class ConnectionNotification.

Table 3-16 Data Retrieval Method for Service Monitor Notifications

Method Result Type Description

getServiceName

String

Service name

See Table 3-11 for possible values.

Service Manager Configuration

Each broker has a single service manager configuration MBean, used for managing all of the broker’s service configuration MBeans.

Object Name

The service manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=ServiceManager,subtype=Config

A string representing this object name is defined as a static constant SERVICE_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attributes

The service manager configuration MBean has the attributes shown in Table 3-17. The names of these attributes are defined as static constants in the utility class ServiceAttributes.

Table 3-17 Service Manager Configuration Attributes

Name Type Settable? Description

MinThreads

Integer

No

Total minimum number of threads for all active services

MaxThreads

Integer

No

Total maximum number of threads for all active services

Operations

The service manager configuration MBean supports the operations shown in Table 3-18. The names of these operations are defined as static constants in the utility class ServiceOperations.

Table 3-18 Service Manager Configuration Operations

Name Parameters Result Type Description

getServices

None

ObjectName`[]`

Object names of service configuration MBeans for all services

pause

None

None

Pause all services except admin and ssladmin

resume

None

None

Resume all services

Service Manager Monitor

Each broker has a single service manager monitor MBean, used for managing all of the broker’s service monitor MBeans.

Object Name

The service manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=ServiceManager,subtype=Monitor

A string representing this object name is defined as a static constant SERVICE_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The service manager monitor MBean has the attributes shown in Table 3-19. The names of these attributes are defined as static constants in the utility class ServiceAttributes.

Table 3-19 Service Manager Monitor Attributes

Name Type Settable? Description

NumServices

Integer

No

Number of connection services

NumActiveThreads

Integer

No

Total current number of threads actively handling connections for all services

NumMsgsIn

Long

No

Total cumulative number of messages received by all services since broker started

NumMsgsOut

Long

No

Total cumulative number of messages sent by all services since broker started

MsgBytesIn

Long

No

Total cumulative size in bytes of messages received by all services since broker started

MsgBytesOut

Long

No

Total cumulative size in bytes of messages sent by all services since broker started

NumPktsIn

Long

No

Total cumulative number of packets received by all services since broker started

NumPktsOut

Long

No

Total cumulative number of packets sent by all services since broker started

PktBytesIn

Long

No

Total cumulative size in bytes of packets received by all services since broker started

PktBytesOut

Long

No

Total cumulative size in bytes of packets sent by all services since broker started

Operation

The service manager monitor MBean supports the operation shown in Table 3-20. The name of this operation is defined as a static constant in the utility class ServiceOperations.

Table 3-20 Service Manager Monitor Operation

Name Parameters Result Type Description

getServices

None

ObjectName`[]`

Object names of all service monitor MBeans

Notifications

The service manager monitor MBean supports the notifications shown in Table 3-21. These notifications are instances of the Message Queue JMX class ServiceNotification, and their names are defined as static constants in that class.

Table 3-21 Service Manager Monitor Notifications

Name Utility Constant Description

mq.service.pause

ServiceNotification`.``SERVICE_PAUSE`

Service paused

mq.service.resume

ServiceNotification`.``SERVICE_RESUME`

Service resumed

Table 3-22 shows the method defined in class ServiceNotification for obtaining details about a service manager monitor notification.

Table 3-22 Data Retrieval Method for Service Manager Monitor Notifications

Method Result Type Description

getServiceName

String

Service name

See Table 3-11 for possible values.

Connections

This section describes the MBeans used for managing connections:

  • The connection configuration MBean configures a connection.

  • The connection monitor MBean monitors a connection.

  • The connection manager configuration MBean manages connection configuration MBeans.

  • The connection manager monitor MBean manages connection monitor MBeans.

The following subsections describe each of these MBeans in detail.

Connection Configuration

The connection configuration MBean is used for configuring a connection. There is one such MBean for each connection.

Object Name

The connection configuration MBean has an object name of the following form:

`com.sun.messaging.jms.server:type=Connection,subtype=Config,id=`connectionID

where connectionID is the connection identifier. For example:

com.sun.messaging.jms.server:type=Connection,subtype=Config,
id=7853717387765338368

The utility class MQObjectName provides a static method, createConnectionConfig, for constructing object names of this form.

Attribute

The connection configuration MBean has the attribute shown in Table 3-23. The name of this attribute is defined as a static constant in the utility class ConnectionAttributes.

Table 3-23 Connection Configuration Attribute

Name Type Settable? Description

ConnectionID

String

No

Connection identifier

Connection Monitor

The connection monitor MBean is used for monitoring a connection. There is one such MBean for each connection.

Object Name

The connection monitor MBean has an object name of the following form:

`com.sun.messaging.jms.server:type=Connection,subtype=Monitor,id=`connectionID

where connectionID is the connection identifier. For example:

com.sun.messaging.jms.server:type=Connection,subtype=Monitor,
id=7853717387765338368

The utility class MQObjectName provides a static method, createConnectionMonitor, for constructing object names of this form.

Attributes

The connection monitor MBean has the attributes shown in Table 3-24. The names of these attributes are defined as static constants in the utility class ConnectionAttributes.

Table 3-24 Connection Monitor Attributes

Name Type Settable? Description

ConnectionID

String

No

Connection identifier

Host

String

No

Host from which connection was made

Port

Integer

No

Port number

ServiceName

String

No

Connection service name

User

String

No

User name

ClientID

String

No

Client identifier

ClientPlatform

String

No

String describing client platform

NumProducers

Integer

No

Current number of associated message producers

NumConsumers

Integer

No

Current number of associated message consumers

Operations

The connection monitor MBean supports the operations shown in Table 3-25. The names of these operations are defined as static constants in the utility class ConnectionOperations.

Table 3-25 Connection Monitor Operations

Name Parameters Result Type Description

getService

None

ObjectName

Object name of service monitor MBean for associated connection service

getTemporaryDestinations

None

ObjectName`[]`

Object names of destination monitor MBeans for all associated temporary destinations

getProducerIDs

None

String`[]`

Producer identifiers of all associated message producers

getConsumerIDs

None

String`[]`

Consumer identifiers of all associated message consumers

Connection Manager Configuration

Each broker has a single connection manager configuration MBean, used for managing all of the broker’s connection configuration MBeans.

Object Name

The connection manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=ConnectionManager,subtype=Config

A string representing this object name is defined as a static constant CONNECTION_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attribute

The connection manager configuration MBean has the attribute shown in Table 3-26. The name of this attribute is defined as a static constant in the utility class ConnectionAttributes.

Table 3-26 Connection Manager Configuration Attribute

Name Type Settable? Description

NumConnections

Integer

No

Number of current connections

Operations

The connection manager configuration MBean supports the operations shown in Table 3-27. The names of these operations are defined as static constants in the utility class ConnectionOperations.

Table 3-27 Connection Manager Configuration Operations

Name Parameters Result Type Description

getConnections

None

ObjectName`[]`

Object names of connection configuration MBeans for all current connections

destroy

connectionID (Long)

None

Destroy connection

The desired connection is designated by its connection identifier (connectionID).

Connection Manager Monitor

Each broker has a single connection manager monitor MBean, used for managing all of the broker’s connection monitor MBeans.

Object Name

The connection manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=ConnectionManager,subtype=Monitor

A string representing this object name is defined as a static constant CONNECTION_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The connection manager monitor MBean has the attributes shown in Table 3-28. The names of these attributes are defined as static constants in the utility class ConnectionAttributes.

Table 3-28 Connection Manager Monitor Attributes

Name Type Settable? Description

NumConnections

Integer

No

Current number of connections

NumConnectionsOpened

Long

No

Cumulative number of connections opened since broker started

NumConnectionsRejected

Long

No

Cumulative number of connections rejected since broker started

Operation

The connection manager monitor MBean supports the operation shown in Table 3-29. The name of this operation is defined as a static constant in the utility class ConnectionOperations.

Table 3-29 Connection Manager Monitor Operation

Name Parameters Result Type Description

getConnections

None

ObjectName`[]`

Object names of connection monitor MBeans for all current connections

Notifications

The connection manager monitor MBean supports the notifications shown in Table 3-30. These notifications are instances of the Message Queue JMX class ConnectionNotification, and their names are defined as static constants in that class.

Table 3-30 Connection Manager Monitor Notifications

Name Utility Constant Description

mq.connection.open

ConnectionNotification`.``CONNECTION_OPEN`

Connection opened

mq.connection.reject

ConnectionNotification`.``CONNECTION_REJECT`

Connection rejected

mq.connection.close

ConnectionNotification`.``CONNECTION_CLOSE`

Connection closed

Table 3-31 shows the methods defined in class ConnectionNotification for obtaining details about a connection manager monitor notification.

Table 3-31 Data Retrieval Methods for Connection Manager Monitor Notifications

Method Result Type Description

getConnectionID

String

Connection identifier

getRemoteHost

String

Host from which connection was made

getServiceName

String

Connection service name

getUserName

String

User name

Destinations

This section describes the MBeans used for managing destinations:

  • The destination configuration MBean configures a destination.

  • The destination monitor MBean monitors a destination.

  • The destination manager configuration MBean manages destination configuration MBeans.

  • The destination manager monitor MBean manages destination monitor MBeans.

The following subsections describe each of these MBeans in detail.

Destination Configuration

The destination configuration MBean is used for configuring a destination. There is one such MBean for each destination.

Object Name

The destination configuration MBean has an object name of the following form:

com.sun.messaging.jms.server:type=Destination,subtype=Config,
desttype=destinationType,name=destinationName

where destinationType is one of the destination types shown in Table 3-33 and destinationName is the name of the destination. For example:

com.sun.messaging.jms.server:type=Destination,subtype=Config,desttype=t,
name="Dest"

The utility class MQObjectName provides a static method, createDestinationConfig, for constructing object names of this form.

Attributes

The destination configuration MBean has the attributes shown in Table 3-32. The names of these attributes are defined as static constants in the utility class DestinationAttributes.

Table 3-32 Destination Configuration Attributes

Name Type Settable? Description

Name

String

No

Destination name

Type

String

No

Destination type

See Table 3-33 for possible values.

MaxNumMsgs

Long

Yes

Maximum number of unconsumed messages

A value of -1 denotes an unlimited number of messages.

MaxBytesPerMsg

Long

Yes

Maximum size, in bytes, of any single message

Rejection of a persistent message is reported to the producing client with an exception; no notice is sent for nonpersistent messages.

A value of -1 denotes an unlimited message size.

MaxTotalMsgBytes

Long

Yes

Maximum total memory, in bytes, for unconsumed messages

LimitBehavior

String

Yes

Broker behavior when memory-limit threshold reached

See Table 3-34 for possible values.

If the value is REMOVE_OLDEST or REMOVE_LOW_PRIORITY and the UseDMQ attribute is true, excess messages are moved to the dead message queue.

MaxNumProducers

Integer

Yes

Maximum number of associated message producers

When this limit is reached, no new producers can be created. A value of -1 denotes an unlimited number of producers.

`MaxNumActiveConsumers`Foot 1 

Integer

Yes

Maximum number of associated active message consumers in load-balanced delivery

A value of -1 denotes an unlimited number of consumers.

`MaxNumBackupConsumers`Footref 1

Integer

Yes

Maximum number of associated backup message consumers in load-balanced delivery

A value of -1 denotes an unlimited number of consumers.

ConsumerFlowLimit

Long

Yes

Maximum number of messages delivered to consumer in a single batch

In load-balanced queue delivery, this is the initial number of queued messages routed to active consumers before load balancing begins. A destination consumer can override this limit by specifying a lower value on a connection.

A value of -1 denotes an unlimited number of consumers.

LocalOnly

Boolean

No

Local delivery only?

This property applies only to destinations in broker clusters, and cannot be changed once the destination has been created. If true, the destination is not replicated on other brokers and is limited to delivering messages only to local consumers (those connected to the broker on which the destination is created).

`LocalDeliveryPreferred`Footref 1

Boolean

Yes

Local delivery preferred?

This property applies only to load-balanced delivery in broker clusters. If true, messages will be delivered to remote consumers only if there are no associated consumers on the local broker. The destination must not be restricted to local-only delivery (LocalOnly must be false).

UseDMQ

Boolean

Yes

Send dead messages to dead message queue?

If false, dead messages will simply be discarded.

ValidateXMLSchemaEnabled

Boolean

Yes

XML schema validation is enabled?

If set to false or not set, then XML schema validation is not enabled for the destination.

XMLSchemaURIList

String

Yes

Space separated list of XML schema document (XSD) URI strings

The URIs point to the location of one or more XSDs to use for XML schema validation, if enabled.

Use double quotes around this value if multiple URIs are specified.

Example:

"http://foo/flap.xsd http://test.com/test.xsd"

If this property is not set or null and XML validation is enabled, XML validation is performed using a DTD specified in the XML document.

ReloadXMLSchemaOnFailure

Boolean

Yes

Reload XML schema on failure enabled?

If set to false or not set, then the schema is not reloaded if validation fails.

Footnote 1 Queue destinations only

Table 3-33 shows the possible values for the Type attribute. These values are defined as static constants in the utility class DestinationType.

Table 3-33 Destination Configuration Type Values

Value Utility Constant Meaning

q

DestinationType`.``QUEUE`

Queue (point-to-point) destination

t

DestinationType`.``TOPIC`

Topic (publish/subscribe) destination

Table 3-34 shows the possible values for the LimitBehavior attribute. These values are defined as static constants in the utility class DestinationLimitBehavior.

Table 3-34 Destination Limit Behaviors

Value Utility Constant Meaning

FLOW_CONTROL

DestinationLimitBehavior`.``FLOW_CONTROL`

Slow down producers

REMOVE_OLDEST

DestinationLimitBehavior`.``REMOVE_OLDEST`

Throw out oldest messages

REMOVE_LOW_PRIORITY

DestinationLimitBehavior`.``REMOVE_LOW_PRIORITY`

Throw out lowest-priority messages according to age; no notice to producing client

REJECT_NEWEST

DestinationLimitBehavior`.``REJECT_NEWEST`

Reject newest messages; notify producing client with an exception only if message is persistent

Operations

The destination configuration MBean supports the operations shown in Table 3-35. The names of these operations are defined as static constants in the utility class DestinationOperations.

Table 3-35 Destination Configuration Operations

Name Parameters Result Type Description

pause

pauseType (String)

None

Pause message delivery

See Table 3-36 for possible values of pauseType.

pause

None

None

Pause all message delivery

Equivalent to pause`(``DestinationPauseType``.``ALL``)`.

resume

None

None

Resume message delivery

purge

None

None

Purge all messages

`compact`Foot 1 

None

None

Compact persistent data store

Note: Only a paused destination can be compacted.

Footnote 1 File-based persistence only

Table 3-36 shows the possible values for the pause operation’s pauseType parameter. These values are defined as static constants in the utility class DestinationPauseType.

Table 3-36 Destination Pause Types

Value Utility Constant Meaning

PRODUCERS

DestinationPauseType`.``PRODUCERS`

Pause delivery from associated message producers

CONSUMERS

DestinationPauseType`.``CONSUMERS`

Pause delivery to associated message consumers

ALL

DestinationPauseType`.``ALL`

Pause all message delivery

Notification

The destination configuration MBean supports the notification shown in Table 3-37.

Table 3-37 Destination Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

Destination Monitor

The destination monitor MBean is used for monitoring a destination. There is one such MBean for each destination.

Object Name

The destination monitor MBean has an object name of the following form:

com.sun.messaging.jms.server:type=Destination,subtype=Monitor,
desttype=destinationType,name=destinationName

where destinationType is one of the destination types shown in Table 3-39 and destinationName is the name of the destination. For example:

com.sun.messaging.jms.server:type=Destination,subtype=Monitor,desttype=t,
name="Dest"

The utility class MQObjectName provides a static method, createDestinationMonitor, for constructing object names of this form.

Attributes

The destination monitor MBean has the attributes shown in Table 3-38. The names of these attributes are defined as static constants in the utility class DestinationAttributes.

Table 3-38 Destination Monitor Attributes

Name Type Settable? Description

Name

String

No

Destination name

Type

String

No

Destination type

See Table 3-39 for possible values.

CreatedByAdmin

Boolean

No

Administrator-created destination?

Temporary

Boolean

No

Temporary destination?

`ConnectionID`Foot 1 

String

No

Connection identifier

State

Integer

No

Current state

See Table 3-40 for possible values.

StateLabel

String

No

String representation of current state:

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

See Table 3-40 for possible values.

NumProducers

Integer

No

Current number of associated message producers

NumConsumers

Integer

No

Current number of associated message consumers

For queue destinations, this attribute includes both active and backup consumers. For topic destinations, it includes both nondurable and (active and inactive) durable subscribers and is equivalent to NumActiveConsumers.

NumMsgsInDelayDelivery

Integer

No

Current Number of messages in the destination with a delivery delay waiting for the delivery time arrival.

NumWildcardProducers

Integer

No

Current number of wildcard message producers associated with the destination

For topic destinations only.

NumWildcardConsumers

Integer

No

Current number of wildcard message consumers associated with the destination

For topic destinations only.

NumWildcards

Integer

No

Current number of wildcard message producers and wildcard message consumers associated with the destination

For topic destinations only.

PeakNumConsumers

Integer

No

Peak number of associated message consumers since broker started

For queue destinations, this attribute includes both active and backup consumers. For topic destinations, it includes both nondurable and (active and inactive) durable subscribers and is equivalent to PeakNumActiveConsumers.

AvgNumConsumers

Integer

No

Average number of associated message consumers since broker started

For queue destinations, this attribute includes both active and backup consumers. For topic destinations, it includes both nondurable and (active and inactive) durable subscribers and is equivalent to AvgNumActiveConsumers.

NumActiveConsumers

Integer

No

Current number of associated active message consumers

For topic destinations, this attribute includes both nondurable and (active and inactive) durable subscribers and is equivalent to NumConsumers.

PeakNumActiveConsumers

Integer

No

Peak number of associated active message consumers since broker started

For topic destinations, this attribute includes both nondurable and (active and inactive) durable subscribers and is equivalent to PeakNumConsumers.

AvgNumActiveConsumers

Integer

No

Average number of associated active message consumers since broker started

For topic destinations, this attribute includes both nondurable and (active and inactive) durable subscribers and is equivalent to AvgNumConsumers.

`NumBackupConsumers`Foot 2 

Integer

No

Current number of associated backup message consumers

`PeakNumBackupConsumers`Footref 2

Integer

No

Peak number of associated backup message consumers since broker started

`AvgNumBackupConsumers`Footref 2

Integer

No

Average number of associated backup message consumers since broker started

NumMsgs

Long

No

Current number of messages stored in memory and persistent store

Does not include messages held in transactions.

NumMsgsRemote

Long

No

Current number of messages stored in memory and persistent store that were produced to a remote broker in a cluster. This number does not include messages included in transactions.

NumMsgsPendingAcks

Long

No

Current number of messages being held in memory and persistent store pending acknowledgment

NumMsgsHeldInTransaction

Long

No

Current number of messages being held in memory and persistent store in uncommitted transactions

NextMessageID

String

No

JMS Message ID of the next message to be delivered to any consumer

PeakNumMsgs

Long

No

Peak number of messages stored in memory and persistent store since broker started

AvgNumMsgs

Long

No

Average number of messages stored in memory and persistent store since broker started

NumMsgsIn

Long

No

Cumulative number of messages received since broker started

NumMsgsOut

Long

No

Cumulative number of messages sent since broker started

MsgBytesIn

Long

No

Cumulative size in bytes of messages received since broker started

MsgBytesOut

Long

No

Cumulative size in bytes of messages sent since broker started

PeakMsgBytes

Long

No

Size in bytes of largest single message received since broker started

TotalMsgBytes

Long

No

Current total size in bytes of messages stored in memory and persistent store

Does not include messages held in transactions.

TotalMsgBytesRemote

Long

No

Current total size in bytes of messages stored in memory and persistent store that were produced to a remote broker in a cluster. This value does not include messages included in transactions.

TotalMsgBytesHeldInTransaction

Long

No

Current total size in bytes of messages being held in memory and persistent store in uncommitted transactions

PeakTotalMsgBytes

Long

No

Peak total size in bytes of messages stored in memory and persistent store since broker started

AvgTotalMsgBytes

Long

No

Average total size in bytes of messages stored in memory and persistent store since broker started

`DiskReserved`Foot 3 

Long

No

Amount of disk space, in bytes, reserved for destination

`DiskUsed`Footref 3

Long

No

Amount of disk space, in bytes, currently in use by destination

`DiskUtilizationRatio`Footref 3

Integer

No

Ratio of disk space currently in use to disk space reserved for destination

Footnote 1 Temporary destinations only

Footnote 2 Queue destinations only

Footnote 3 File-based persistence only

Table 3-39 shows the possible values for the Type attribute. These values are defined as static constants in the utility class DestinationType.

Table 3-39 Destination Monitor Type Values

Value Utility Constant Meaning

q

DestinationType`.``QUEUE`

Queue (point-to-point) destination

t

DestinationType`.``TOPIC`

Topic (publish/subscribe) destination

Table 3-40 shows the possible values for the State and StateLabel attributes. These values are defined as static constants in the utility class DestinationState.

Table 3-40 Destination State Values

Value Utility Constant String Representation Meaning

0

DestinationState`.``RUNNING`

RUNNING

Destination running

1

DestinationState`.``CONSUMERS_PAUSED`

CONSUMERS_PAUSED

Message consumers paused

2

DestinationState`.``PRODUCERS_PAUSED`

PRODUCERS_PAUSED

Message producers paused

3

DestinationState`.``PAUSED`

PAUSED

Destination paused

-1

DestinationState`.``UNKNOWN`

UNKNOWN

Destination state unknown

Operations

The destination monitor MBean supports the operations shown in Table 3-41. The names of these operations are defined as static constants in the utility class DestinationOperations.

Table 3-41 Destination Monitor Operations

Name Parameters Result Type Description

`getConnection`Foot 1 

None

ObjectName

Object name of connection monitor MBean for connection

getProducerIDs

None

String`[]`

Producer identifiers of all current associated message producers

getConsumerIDs

None

String`[]`

Consumer identifiers of all current associated message consumers

For queue destinations, this operation returns both active and backup consumers. For topic destinations, it returns both nondurable and (active and inactive) durable subscribers.

getActiveConsumerIDs

None

String`[]`

Consumer identifiers of all current associated active message consumers

For topic destinations, this operation returns both nondurable and (active and inactive) durable subscribers.

`getBackupConsumerIDs`Foot 2 

None

String`[]`

Consumer identifiers of all current associated backup message consumers

getConsumerWildcards

none

String[]

Wildcard strings used by current consumers associated with the destination

For topic destinations only.

getProducerWildcards

none

String[]

Wildcard strings used by current producers associated with the destination

For topic destinations only.

getWildcards

none

String[]

Wildcard strings used by current consumers and producers associated with the destination

For topic destinations only.

getNumWildcardConsumers

wildcard-String

Integer

Number of current consumers associated with the destination that are using the specified wildcard string

For topic destinations only.

getNumWildcardProducers

wildcard-String

Integer

Number of current producers associated with the destination that are using the specified wildcard string

For topic destinations only.

Footnote 1 Temporary destinations only

Footnote 2 Queue destinations only

Notifications

The destination monitor MBean supports the notifications shown in Table 3-42. These notifications are instances of the Message Queue JMX class DestinationNotification, and their names are defined as static constants in that class.

Table 3-42 Destination Monitor Notifications

Name Utility Constant Description

mq.destination.pause

DestinationNotification`.``DESTINATION_PAUSE`

Destination paused

mq.destination.resume

DestinationNotification`.``DESTINATION_RESUME`

Destination resumed

mq.destination.compact

DestinationNotification`.``DESTINATION_COMPACT`

Destination compacted

mq.destination.purge

DestinationNotification`.``DESTINATION_PURGE`

Destination purged

Table 3-43 shows the methods defined in class DestinationNotification for obtaining details about a destination monitor notification.

Table 3-43 Data Retrieval Methods for Destination Monitor Notifications

Method Result Type Description

getDestinationName

String

Destination name

getDestinationType

String

Destination type

See Table 3-39 for possible values.

getCreatedByAdmin

Boolean

Administrator-created destination?

getPauseType

String

Pause type

See Table 3-36 for possible values.

Destination Manager Configuration

Each broker has a single destination manager configuration MBean, used for managing all of the broker’s destination configuration MBeans.

Object Name

The destination manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=DestinationManager,subtype=Config

A string representing this object name is defined as a static constant DESTINATION_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attributes

The destination manager configuration MBean has the attributes shown in Table 3-44. The names of these attributes are defined as static constants in the utility class DestinationAttributes.

Table 3-44 Destination Manager Configuration Attributes

Name Type Settable? Description

AutoCreateQueues

Boolean

Yes

Allow auto-creation of queue destinations?

AutoCreateTopics

Boolean

Yes

Allow auto-creation of topic destinations?

NumDestinations

Integer

No

Current total number of destinations

MaxNumMsgs

Long

Yes

Maximum total number of unconsumed messages

A value of -1 denotes an unlimited number of messages.

MaxBytesPerMsg

Long

Yes

Maximum size, in bytes, of any single message

A value of -1 denotes an unlimited message size.

MaxTotalMsgBytes

Long

Yes

Maximum total memory, in bytes, for unconsumed messages

A value of -1 denotes an unlimited number of bytes.

`AutoCreateQueueMaxNumActiveConsumers`Foot 1 

Integer

Yes

Maximum total number of active message consumers in load-balanced delivery

A value of -1 denotes an unlimited number of consumers.

`AutoCreateQueueMaxNumBackupConsumers`Footref 1

Integer

Yes

Maximum total number of backup message consumers in load-balanced delivery

A value of -1 denotes an unlimited number of consumers.

DMQTruncateBody

Boolean

Yes

Remove message body before storing in dead message queue?

If true, only the message header and property data will be saved.

LogDeadMsgs

Boolean

Yes

Log information about dead messages?

If true, the following events will be logged:

  • A destination is full, having reached its maximum size or message count.

  • The broker discards a message for a reason other than an administrative command or delivery acknowledgment.

  • The broker moves a message to the dead message queue.

Footnote 1 Auto-created queue destinations only

Operations

The destination manager configuration MBean supports the operations shown in Table 3-45. The names of these operations are defined as static constants in the utility class DestinationOperations.

Table 3-45 Destination Manager Configuration Operations

Name Parameters Result Type Description

getDestinations

None

ObjectName`[]`

Object names of destination configuration MBeans for all current destinations

create

destinationType (String)

destinationName (String)

destinationAttributes (AttributeList)

None

Create destination with specified type, name, and attributes

The destinationType and destinationName parameters are required, but destinationAttributes may be null.

See Table 3-46 for possible values of destinationType.

The destinationAttributes list may include any of the attributes listed in Table 3-32 except Name and Type. The names of these attributes are defined as static constants in the utility class DestinationAttributes.

create

destinationType (String)

destinationName (String)

None

Create destination with specified type and name

Equivalent to create`(destinationType,` destinationName`,` null`)`.

See Table 3-46 for possible values of destinationType.

destroy

destinationType (String)

destinationName (String)

None

Destroy destination

See Table 3-46 for possible values of destinationType.

pause

pauseType (String)

None

Pause message delivery for all destinations

See Table 3-47 for possible values of pauseType.

pause

None

None

Pause all message delivery for all destinations

Equivalent to pause`(``DestinationPauseType``.``ALL``)`.

resume

None

None

Resume message delivery for all destinations

`compact`Foot 1 

None

None

Compact all destinations

Note: Only paused destinations can be compacted.

Footnote 1 File-based persistence only

Table 3-46 shows the possible values for the create and destroy operations' destinationType parameters. These values are defined as static constants in the utility class DestinationType.

Table 3-46 Destination Manager Configuration Type Values

Value Utility Constant Meaning

q

DestinationType`.``QUEUE`

Queue (point-to-point) destination

t

DestinationType`.``TOPIC`

Topic (publish/subscribe) destination

Table 3-47 shows the possible values for the pause operation’s pauseType parameter. These values are defined as static constants in the utility class DestinationPauseType.

Table 3-47 Destination Manager Pause Types

Value Utility Constant Meaning

PRODUCERS

DestinationPauseType`.``PRODUCERS`

Pause delivery from associated message producers

CONSUMERS

DestinationPauseType`.``CONSUMERS`

Pause delivery to associated message consumers

ALL

DestinationPauseType`.``ALL`

Pause all delivery

Notification

The destination manager configuration MBean supports the notification shown in Table 3-48.

Table 3-48 Destination Manager Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

Destination Manager Monitor

Each broker has a single destination manager monitor MBean, used for managing all of the broker’s destination monitor MBeans.

Object Name

The destination manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=DestinationManager,subtype=Monitor

A string representing this object name is defined as a static constant DESTINATION_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The destination manager monitor MBean has the attributes shown in Table 3-49. The names of these attributes are defined as static constants in the utility class DestinationAttributes.

Table 3-49 Destination Manager Monitor Attributes

Name Type Settable? Description

NumDestinations

Integer

No

Current total number of destinations

NumMsgs

Long

No

Current total number of messages stored in memory and persistent store for all destinations

Does not include messages held in transactions.

TotalMsgBytes

Long

No

Current total size in bytes of messages stored in memory and persistent store for all destinations

Does not include messages held in transactions.

NumMsgsInDMQ

Long

No

Current number of messages stored in memory and persistent store for dead message queue

TotalMsgBytesInDMQ

Long

No

Current total size in bytes of messages stored in memory and persistent store for dead message queue

Operation

The destination manager monitor MBean supports the operation shown in Table 3-50. The name of this operation is defined as a static constant in the utility class DestinationOperations.

Table 3-50 Destination Manager Monitor Operation

Name Parameters Result Type Description

getDestinations

None

ObjectName`[]`

Object names of destination monitor MBeans for all current destinations

Notifications

The destination manager monitor MBean supports the notifications shown in Table 3-51. These notifications are instances of the Message Queue JMX class DestinationNotification, and their names are defined as static constants in that class.

Table 3-51 Destination Manager Monitor Notifications

Name Utility Constant Description

mq.destination.create

DestinationNotification`.``DESTINATION_CREATE`

Destination created

mq.destination.destroy

DestinationNotification`.``DESTINATION_DESTROY`

Destination destroyed

mq.destination.pause

DestinationNotification`.``DESTINATION_PAUSE`

Destination paused

mq.destination.resume

DestinationNotification`.``DESTINATION_RESUME`

Destination resumed

mq.destination.compact

DestinationNotification`.``DESTINATION_COMPACT`

Destination compacted

mq.destination.purge

DestinationNotification`.``DESTINATION_PURGE`

Destination purged

Table 3-52 shows the methods defined in class DestinationNotification for obtaining details about a destination manager monitor notification.

Table 3-52 Data Retrieval Methods for Destination Manager Monitor Notifications

Method Result Type Description

getDestinationName

String

Destination name

getDestinationType

String

Destination type

See Table 3-46 for possible values.

getCreatedByAdmin

Boolean

Administrator-created destination?

getPauseType

String

Pause type

See Table 3-47 for possible values.

Message Producers

This section describes the MBeans used for managing message producers:

  • The producer manager configuration MBean configures message producers.

  • The producer manager monitor MBean monitors message producers.

The following subsections describe each of these MBeans in detail.

Note

Notice that there are no resource MBeans associated with individual message producers; rather, all producers are managed through the broker’s global producer manager configuration and producer manager monitor MBeans.

Producer Manager Configuration

Each broker has a single producer manager configuration MBean, used for configuring all of the broker’s message producers.

Object Name

The producer manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=ProducerManager,subtype=Config

A string representing this object name is defined as a static constant PRODUCER_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attribute

The producer manager configuration MBean has the attribute shown in Table 3-53. The name of this attribute is defined as a static constant in the utility class ProducerAttributes.

Table 3-53 Producer Manager Configuration Attribute

Name Type Settable? Description

NumProducers

Integer

No

Current total number of message producers

Operation

The producer manager configuration MBean supports the operation shown in Table 3-54. The name of this operation is defined as a static constant in the utility class ProducerOperations.

Table 3-54 Producer Manager Configuration Operation

Name Parameters Result Type Description

getProducerIDs

None

String`[]`

Producer identifiers of all current message producers

Producer Manager Monitor

Each broker has a single producer manager monitor MBean, used for monitoring all of the broker’s message producers.

Object Name

The producer manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=ProducerManager,subtype=Monitor

A string representing this object name is defined as a static constant PRODUCER_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attribute

The producer manager monitor MBean has the attribute shown in Table 3-55. The name of this attribute is defined as a static constant in the utility class ProducerAttributes.

Table 3-55 Producer Manager Monitor Attribute

Name Type Settable? Description

NumProducers

Integer

No

Current total number of message producers

NumWildcardProducers

Integer

No

Number of wildcard message producers associated with the broker

Operations

The producer manager monitor MBean supports the operations shown in Table 3-56. The names of these operations are defined as static constants in the utility class ProducerOperations.

Table 3-56 Producer Manager Monitor Operations

Name Parameters Result Type Description

getProducerIDs

None

String`[]`

Producer identifiers of all current message producers

getProducerInfoByID

producerID (String)

CompositeData

Descriptive information about message producer

The desired producer is designated by its producer identifier (producerID). The value returned is a JMX CompositeData object describing the producer; see Table 3-57 for lookup keys used with this object.

getProducerInfo

None

CompositeData`[]`

Descriptive information about all current message producers

The value returned is an array of JMX CompositeData objects describing the producers; see Table 3-57 for lookup keys used with these objects.

getProducerWildcards

None

String[]

Wildcard strings used by current producers associated with the broker

getNumWildcardProducers

wildcard-String

Integer

Number of current producers associated with the broker that are using the specified wildcard string

The getProducerInfoByID and getProducerInfo operations return objects implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3-57 are defined as static constants in the utility class ProducerInfo for use with these objects.

Table 3-57 Lookup Keys for Message Producer Information

Name Value Type Description

ProducerID

String

Producer identifier

ServiceName

String

Name of associated connection service

ConnectionID

String

Connection identifier of associated connection

Host

String

Connection’s host name

User

String

Connection’s user name

DestinationName

String

Name of associated destination

DestinationNames

String[]

Destination names that match wildcards used by wildcard producers

For topic destinations only.

Wildcard

Boolean

Wildcard producer?

For topic destinations only.

DestinationType

String

Type of associated destination

See Table 3-58 for possible values.

FlowPaused

Boolean

Message delivery paused?

NumMsgs

Long

Number of messages sent

Table 3-58 shows the possible values returned for the lookup key DestinationType. These values are defined as static constants in the utility class DestinationType.

Table 3-58 Message Producer Destination Types

Value Utility Constant Meaning

q

DestinationType`.``QUEUE`

Queue (point-to-point) destination

t

DestinationType`.``TOPIC`

Topic (publish/subscribe) destination

Message Consumers

This section describes the MBeans used for managing message consumers:

  • The consumer manager configuration MBean configures message consumers.

  • The consumer manager monitor MBean monitors message consumers.

The following subsections describe each of these MBeans in detail.

Note

Notice that there are no resource MBeans associated with individual message consumers; rather, all consumers are managed through the broker’s global consumer manager configuration and consumer manager monitor MBeans.

Consumer Manager Configuration

Each broker has a single consumer manager configuration MBean, used for configuring all of the broker’s message consumers.

Object Name

The consumer manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=ConsumerManager,subtype=Config

A string representing this object name is defined as a static constant CONSUMER_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attribute

The consumer manager configuration MBean has the attribute shown in Table 3-59. The name of this attribute is defined as a static constant in the utility class ConsumerAttributes.

Table 3-59 Consumer Manager Configuration Attribute

Name Type Settable? Description

NumConsumers

Integer

No

Current total number of message consumers

Operations

The consumer manager configuration MBean supports the operations shown in Table 3-60. The names of these operations are defined as static constants in the utility class ConsumerOperations.

Table 3-60 Consumer Manager Configuration Operations

Name Parameters Result Type Description

getConsumerIDs

None

String`[]`

Consumer identifiers of all current message consumers

`purge`Foot 1 

consumerID (String)

None

Purge all messages

The desired subscriber is designated by its consumer identifier (consumerID).

The subscriber itself is not destroyed.

Footnote 1 Durable topic subscribers only

Consumer Manager Monitor

Each broker has a single consumer manager monitor MBean, used for monitoring all of the broker’s message consumers.

Object Name

The consumer manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=ConsumerManager,subtype=Monitor

A string representing this object name is defined as a static constant CONSUMER_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attribute

The consumer manager monitor MBean has the attribute shown in Table 3-61. The name of this attribute is defined as a static constant in the utility class ConsumerAttributes.

Table 3-61 Consumer Manager Monitor Attribute

Name Type Settable? Description

NumConsumers

Integer

No

Current total number of message consumers

NumWildcardConsumers

Integer

No

Number of wildcard message consumers associated with the broker

Operations

The consumer manager monitor MBean supports the operations shown in Table 3-62. The names of these operations are defined as static constants in the utility class ConsumerOperations.

Table 3-62 Consumer Manager Monitor Operations

Name Parameters Result Type Description

getConsumerIDs

None

String`[]`

Consumer identifiers of all current message consumers

getConsumerInfoByID

consumerID (String)

CompositeData

Descriptive information about message consumer

The desired consumer is designated by its consumer identifier (consumerID). The value returned is a JMX CompositeData object describing the consumer; see Table 3-63 for lookup keys used with this object.

getConsumerInfo

None

CompositeData`[]`

Descriptive information about all current message consumers

The value returned is an array of JMX CompositeData objects describing the consumers; see Table 3-63 for lookup keys used with these objects.

getConsumerWildcards

none

String[]

Wildcard strings used by current consumers associated with the broker

getNumWildcardConsumers

wildcard-String

Integer

Number of current consumers associated with the broker that are using the specified wildcard string

The getConsumerInfoByID and getConsumerInfo operations return objects implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3-63 are defined as static constants in the utility class ConsumerInfo for use with these objects.

Table 3-63 Lookup Keys for Message Consumer Information

Name Value Type Description

ConsumerID

String

Consumer identifier

Selector

String

Message selector

ServiceName

String

Name of associated connection service

ConnectionID

String

Connection identifier of associated connection

Host

String

Connection’s host name

User

String

Connection’s user name

DestinationName

String

Name of associated destination

DestinationNames

String[]

Destination names that match wildcards used by wildcard consumers

For topic destinations only.

Wildcard

Boolean

Wildcard consumer?

For topic destinations only.

DestinationType

String

Type of associated destination

See Table 3-64 for possible values.

AcknowledgeMode

Integer

Acknowledgment mode of associated session

See Table 3-65 for possible values.

AcknowledgeModeLabel

String

String representation of acknowledgment mode

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

See Table 3-65 for possible values.

Durable

Boolean

Durable topic subscriber?

`DurableName`Foot 1 

String

Subscription name

`ClientID`Footref 1

String

Client identifier

`DurableActive`Footref 1

Boolean

Subscriber active?

FlowPaused

Boolean

Message delivery paused?

NumMsgs

Long

Cumulative number of messages that have been dispatched to consumer (includes messages that have been delivered and those waiting to be delivered)

NumMsgsPending

Long

Current number of messages that have been dispatched to consumer and are being held in broker memory and persistent store (includes messages that have been delivered and those waiting to be delivered)

NumMsgsPendingAcks

Long

Current number of messages that have been delivered to consumer and are being held in broker memory and persistent store pending acknowledgment

NextMessageID

Long

JMS Message ID of the next message to be delivered to consumer

LastAckTime

Long

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

Footnote 1 Durable topic subscribers only

Table 3-64 shows the possible values returned for the lookup key DestinationType. These values are defined as static constants in the utility class DestinationType.

Table 3-64 Message Consumer Destination Types

Value Utility Constant Meaning

q

DestinationType`.``QUEUE`

Queue (point-to-point) destination

t

DestinationType`.``TOPIC`

Topic (publish/subscribe) destination

Table 3-65 shows the possible values returned for the lookup keys AcknowledgeMode and AcknowledgeModeLabel. Four of these values are defined as static constants in the standard JMS interface jakarta.jms.Session; the fifth (NO_ACKNOWLEDGE) is defined in the extended Message Queue version of the interface, com.sun.messaging.jms.Session.

Table 3-65 Acknowledgment Modes

Value Utility Constant String Representation Meaning

1

jakarta.jms.Session`.``AUTO_ACKNOWLEDGE`

AUTO_ACKNOWLEDGE

Auto-acknowledge mode

2

jakarta.jms.Session`.``CLIENT_ACKNOWLEDGE`

CLIENT_ACKNOWLEDGE

Client-acknowledge mode

3

jakarta.jms.Session`.``DUPS_OK_ACKNOWLEDGE`

DUPS_OK_ACKNOWLEDGE

Dups-OK-acknowledge mode

32768

com.sun.messaging.jms.Session`.``NO_ACKNOWLEDGE`

NO_ACKNOWLEDGE

No-acknowledge mode

0

jakarta.jms.Session`.``SESSION_TRANSACTED`

SESSION_TRANSACTED

Session is transacted (acknowledgment mode ignored)

Transactions

This section describes the MBeans used for managing transactions:

  • The transaction manager configuration MBean configures transactions.

  • The transaction manager monitor MBean monitors transactions.

The following subsections describe each of these MBeans in detail.

Note

Notice that there are no resource MBeans associated with individual transactions; rather, all transactions are managed through the broker’s global transaction manager configuration and transaction manager monitor MBeans.

Transaction Manager Configuration

Each broker has a single transaction manager configuration MBean, used for configuring all of the broker’s transactions.

Object Name

The transaction manager configuration MBean has the following object name:

com.sun.messaging.jms.server:type=TransactionManager,subtype=Config

A string representing this object name is defined as a static constant TRANSACTION_MANAGER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attribute

The transaction manager configuration MBean has the attribute shown in Table 3-66. The name of this attribute is defined as a static constant in the utility class TransactionAttributes.

Table 3-66 Transaction Manager Configuration Attribute

Name Type Settable? Description

NumTransactions

Integer

No

Current number of open transactions

Operations

The transaction manager configuration MBean supports the operations shown in Table 3-67. The names of these operations are defined as static constants in the utility class TransactionOperations.

Table 3-67 Transaction Manager Configuration Operations

Name Parameters Result Type Description

getTransactionIDs

None

String`[]`

Transaction identifiers of all current open transactions

commit

transactionID (String)

None

Commit transaction

The desired transaction is designated by its transaction identifier (transactionID).

rollback

transactionID (String)

None

Roll back transaction

The desired transaction is designated by its transaction identifier (transactionID).

Transaction Manager Monitor

Each broker has a single transaction manager monitor MBean, used for monitoring all of the broker’s transactions.

Object Name

The transaction manager monitor MBean has the following object name:

com.sun.messaging.jms.server:type=TransactionManager,subtype=Monitor

A string representing this object name is defined as a static constant TRANSACTION_MANAGER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The transaction manager monitor MBean has the attributes shown in Table 3-68. The names of these attributes are defined as static constants in the utility class TransactionAttributes.

Table 3-68 Transaction Manager Monitor Attributes

Name Type Settable? Description

NumTransactions

Integer

No

Current number of open transactions

NumTransactionsCommitted

Long

No

Cumulative number of transactions committed since broker started

NumTransactionsRollback

Long

No

Cumulative number of transactions rolled back since broker started

Operations

The transaction manager monitor MBean supports the operations shown in Table 3-69. The names of these operations are defined as static constants in the utility class TransactionOperations.

Table 3-69 Transaction Manager Monitor Operations

Name Parameters Result Type Description

getTransactionIDs

None

String`[]`

Transaction identifiers of all current open transactions

getTransactionInfoByID

transactionID (String)

CompositeData

Descriptive information about transaction

The desired transaction is designated by its transaction identifier (transactionID). The value returned is a JMX CompositeData object describing the transaction; see Table 3-70 for lookup keys used with this object.

getTransactionInfo

None

CompositeData`[]`

Descriptive information about all current open transactions

The value returned is an array of JMX CompositeData objects describing the transactions; see Table 3-70 for lookup keys used with these objects.

The getTransactionInfoByID and getTransactionInfo operations return objects implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3-70 are defined as static constants in the utility class TransactionInfo for use with these objects.

Table 3-70 Lookup Keys for Transaction Information

Name Value Type Description

TransactionID

String

Transaction identifier

`XID`Foot 1 

String

Distributed transaction identifier (XID)

User

String

User name

ClientID

String

Client identifier

ConnectionString

String

Connection string

CreationTime

Long

Time created, in standard Java format (milliseconds since January 1, 1970, 00:00:00 UTC)

State

Integer

Current state

See Table 3-71 for possible values.

StateLabel

String

String representation of current state

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

See Table 3-71 for possible values.

NumMsgs

Long

Number of messages

NumAcks

Long

Number of acknowledgments

Footnote 1 Distributed transactions only

Table 3-71 shows the possible values returned for the lookup keys State and StateLabel. These values are defined as static constants in the utility class TransactionState.

Table 3-71 Transaction State Values

Value Utility Constant String Representation Meaning

0

TransactionState`.``CREATED`

CREATED

Transaction created

1

TransactionState`.``STARTED`

STARTED

Transaction started

2

TransactionState`.``FAILED`

FAILED

Transaction has failed

3

TransactionState`.``INCOMPLETE`

INCOMPLETE

Transaction incomplete

4

TransactionState`.``COMPLETE`

COMPLETE

Transaction complete

5

TransactionState`.``PREPARED`

PREPARED

Transaction in prepared stateFoot 1 

6

TransactionState`.``COMMITTED`

COMMITTED

Transaction committed

7

TransactionState`.``ROLLEDBACK`

ROLLEDBACK

Transaction rolled back

8

TransactionState`.``TIMED_OUT`

TIMED_OUT

Transaction has timed out

-1

TransactionState`.``UNKNOWN`

UNKNOWN

Transaction state unknown

Footnote 1 Distributed transactions only

Notifications

The transaction manager monitor MBean supports the notifications shown in Table 3-72. These notifications are instances of the Message Queue JMX class TransactionNotification, and their names are defined as static constants in that class.

Table 3-72 Transaction Manager Monitor Notifications

Name Utility Constant Description

`mq.transaction.prepare`Foot 1 

TransactionNotification`.``TRANSACTION_PREPARE`

Transaction has entered prepared state

mq.transaction.commit

TransactionNotification`.``TRANSACTION_COMMIT`

Transaction committed

mq.transaction.rollback

TransactionNotification`.``TRANSACTION_ROLLBACK`

Transaction rolled back

Footnote 1 Distributed transactions only

Table 3-73 shows the method defined in class TransactionNotification for obtaining details about a transaction manager monitor notification.

Table 3-73 Data Retrieval Method for Transaction Manager Monitor Notifications

Method Result Type Description

getTransactionID

String

Transaction identifier

Broker Clusters

This section describes the MBeans used for managing broker clusters:

  • The cluster configuration MBean configures a broker’s cluster-related properties.

  • The cluster monitor MBean monitors the brokers in a cluster.

The following subsections describe each of these MBeans in detail.

Cluster Configuration

The cluster configuration MBean is used for configuring a broker’s cluster-related properties. There is one such MBean for each broker.

Object Name

The cluster configuration MBean has the following object name:

com.sun.messaging.jms.server:type=Cluster,subtype=Config

A string representing this object name is defined as a static constant CLUSTER_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attributes

The cluster configuration MBean has the attributes shown in Table 3-74. The names of these attributes are defined as static constants in the utility class ClusterAttributes.

Table 3-74 Cluster Configuration Attributes

Name Type Settable? Description

HighlyAvailable

Boolean

No

High-availability (HA) cluster?

`ClusterID`Foot 1 

String

No

Cluster 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 clusters may have the same cluster identifier.

This string is appended to the names of all database tables in the cluster’s shared persistent store.

Note: For brokers belonging to an HA cluster, this attribute is used in database table names in place of BrokerID (see Table 3-1).

`ConfigFileURL`Foot 2 

String

Yes

URL of cluster configuration file

LocalBrokerInfo

CompositeData

No

Descriptive information about local broker

The value returned is a JMX CompositeData object describing the broker; see Table 3-76 for lookup keys used with this object.

`MasterBrokerInfo`Footref 2

CompositeData

No

Descriptive information about master broker

The value returned is a JMX CompositeData object describing the master broker; see Table 3-76 for lookup keys used with this object.

`UseSharedDatabaseForConfigRecord`Footref 2

Boolean

No

Does conventional cluster use a shared JDBC data store instead of a master broker for the cluster configuration change record?

Footnote 1 HA clusters only

Footnote 2 Conventional clusters only

Operations

The cluster configuration MBean supports the operations shown in Table 3-75. The names of these operations are defined as static constants in the utility class ClusterOperations.

Table 3-75 Cluster Configuration 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`Foot 1 

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; see Table 3-76 for lookup keys used with this object.

`getBrokerInfoByID`Footref 1

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; see Table 3-76 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-76 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.

`reload`Foot 2 

None

None

Reload cluster configuration file

`changeMasterBroker`Footref 2

oldMasterBroker (String), newMasterBroker (String)

CompositeData

Specify a change of master broker from oldMasterBroker to newMasterBroker, where both arguments are in imq.cluster.masterbroker format (host:port).

The value returned is a JMX CompositeData object containing information about the success or failure of the operation; see Table 3-77 for lookup keys used with this object.

This operation can only be performed on the broker that is the current master broker. If it is performed on any other broker it will have no effect and the CompositeData object returned will contain details of the error.

This operation must not be performed on a broker whose lifecycle is being managed by GlassFish Server. In this case GlassFish Server tools must be used instead.

Footnote 1 HA clusters only

Footnote 2 Conventional clusters only

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-76 are defined as static constants in the utility class BrokerClusterInfo for use with these objects.

Table 3-76 Lookup Keys for Cluster Configuration Information

Key Value Type Description

Address

String

Broker address, in the form hostName`:`portNumber

Example:

host1:3000

`ID`Foot 1 

String

Broker identifier

Footnote 1 HA clusters only

The changeMasterBroker operation returns an object implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3-77 are defined as static constants in the utility class ChangeMasterBrokerResultInfo for use with this object.

Table 3-77 Lookup Keys for changeMasterBroker

Key Value Type Description

Success

Boolean

Whether an error occurred when performing the changeMasterBroker operation. If an error occurred, the StatusCode and DetailMessage keys contain more information.

StatusCode

Integer

A status code set when an error occurred. The DetailMessage key contains more information.

DetailMessage

String

An error message set when an error occurs. The possible errors, and the actions that should be taken to resolve them, are the same as for the imqcmd changemaster command, as described in "To Change the Master Broker Dynamically While the Cluster Is Running" in Open Message Queue Administration Guide.

Notification

The cluster configuration MBean supports the notification shown in Table 3-78.

Table 3-78 Cluster Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

Cluster Monitor

The cluster monitor MBean is used for monitoring the brokers in a cluster. There is one such MBean for each broker.

Object Name

The cluster monitor MBean has the following object name:

com.sun.messaging.jms.server:type=Cluster,subtype=Monitor

A string representing this object name is defined as a static constant CLUSTER_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The cluster monitor MBean has the attributes shown in Table 3-79. The names of these attributes are defined as static constants in the utility class ClusterAttributes.

Table 3-79 Cluster Monitor Attributes

Name Type Settable? Description

HighlyAvailable

Boolean

No

High-availability (HA) cluster?

`ClusterID`Foot 1 

String

No

Cluster 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 clusters may have the same cluster identifier.

This string is appended to the names of all database tables in the cluster’s shared persistent store.

Note: For brokers belonging to an HA cluster, this attribute is used in database table names in place of BrokerID (see Table 3-4).

`ConfigFileURL`Foot 2 

String

Yes

URL of cluster configuration file

LocalBrokerInfo

CompositeData

No

Descriptive information about local broker

The value returned is a JMX CompositeData object describing the broker; see Table 3-81 for lookup keys used with this object.

`MasterBrokerInfo`Footref 2

CompositeData

No

Descriptive information about master broker

The value returned is a JMX CompositeData object describing the master broker; see Table 3-81 for lookup keys used with this object.

`UseSharedDatabaseForConfigRecord`Footref 2

Boolean

No

Does conventional cluster use a shared JDBC data store instead of a master broker for the cluster configuration change record?

Footnote 1 HA clusters only

Footnote 2 Conventional clusters only

Operations

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

Table 3-80 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`Foot 1 

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-81 for lookup keys used with this object.

`getBrokerInfoByID`Footref 1

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-81 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-81 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.

Footnote 1 HA clusters only

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-81 are defined as static constants in the utility class BrokerClusterInfo for use with these objects.

Table 3-81 Lookup Keys for Cluster Monitor Information

Key Value Type Description

Address

String

Broker address, in the form hostName`:`portNumber

Example:

host1:3000

`ID`Foot 1 

String

Broker identifier

State

Integer

Current state of broker

See Table 3-82 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-82 for possible values.

`TakeoverBrokerID`Footref 1

String

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

`NumMsgs`Footref 1

Long

Current number of messages stored in memory and persistent store

`StatusTimestamp`Footref 1

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.

Footnote 1 HA clusters only

Table 3-82 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-82 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

Notifications

The cluster monitor MBean supports the notifications shown in Table 3-83. These notifications are instances of the Message Queue JMX classes ClusterNotification and BrokerNotification, and their names are defined as static constants in those classes.

Table 3-83 Cluster Monitor Notifications

Name Utility Constant Description

mq.cluster.broker.join

ClusterNotification`.``CLUSTER_BROKER_JOIN`

A broker has joined the cluster

mq.cluster.broker.down

ClusterNotification`.``CLUSTER_BROKER_DOWN`

A broker in the cluster has shut down or crashed

`mq.broker.takeover.start`Foot 1 

BrokerNotification`.``BROKER_TAKEOVER_START`

A broker has begun taking over persistent data store from another broker

`mq.broker.takeover.complete`Footref 1

BrokerNotification`.``BROKER_TAKEOVER_COMPLETE`

A broker has finished taking over persistent data store from another broker

`mq.broker.takeover.fail`Footref 1

BrokerNotification`.``BROKER_TAKEOVER_FAIL`

An attempted takeover has failed

Footnote 1 HA clusters only

Table 3-84 shows the methods defined in class ClusterNotification for obtaining details about a cluster monitor notification. See Table 3-6 for the corresponding methods of class BrokerNotification.

Table 3-84 Data Retrieval Methods for Cluster Monitor Notifications

Method Result Type Description

isHighlyAvailable

Boolean

High-availability (HA) cluster?

getClusterID

String

Cluster identifier

getBrokerID

String

Broker identifier of affected broker

getBrokerAddress

String

Address of affected broker, in the form hostName`:`portNumber

Example:

host1:3000

`isMasterBroker`Foot 1 

Boolean

Master broker affected?

Footnote 1 Conventional clusters only

Logging

This section describes the MBeans used for logging Message Queue operations:

  • The log configuration MBean configures Message Queue logging.

  • The log monitor MBean monitors Message Queue logging.

The following subsections describe each of these MBeans in detail.

Log Configuration

Each broker has a single log configuration MBean, used for configuring Message Queue logging.

Object Name

The log configuration MBean has the following object name:

com.sun.messaging.jms.server:type=Log,subtype=Config

A string representing this object name is defined as a static constant LOG_CONFIG_MBEAN_NAME in the utility class MQObjectName.

Attributes

The log configuration MBean has the attributes shown in Table 3-85. The names of these attributes are defined as static constants in the utility class LogAttributes.

Table 3-85 Log Configuration Attributes

Name Type Settable? Description

Level

String

Yes

Logging level

Specifies the categories of logging information that can be written to an output channel. See Table 3-86 for possible values.

RolloverBytes

Long

Yes

File length, in bytes, at which output rolls over to a new log file

A value of -1 denotes an unlimited number of bytes (no rollover based on file length).

RolloverSecs

Long

Yes

Age of file, in seconds, at which output rolls over to a new log file

A value of -1 denotes an unlimited number of seconds (no rollover based on file age).

Table 3-86 shows the possible values for the Level attribute. Each level includes those above it (for example, WARNING includes ERROR). These values are defined as static constants in the utility class LogLevel.

Table 3-86 Log Configuration Logging Levels

Name Utility Constant Meaning

NONE

LogLevel`.``NONE`

No logging

ERROR

LogLevel`.``ERROR`

Log error messages

WARNING

LogLevel`.``WARNING`

Log warning messages

INFO

LogLevel`.``INFO`

Log informational messages

UNKNOWN

LogLevel`.``UNKNOWN`

Logging level unknown

Notification

The log configuration MBean supports the notification shown in Table 3-87.

Table 3-87 Log Configuration Notification

Name Description

jmx.attribute.change

Attribute value changed

Log Monitor

Each broker has a single log monitor MBean, used for monitoring Message Queue logging.

Object Name

The log monitor MBean has the following object name:

com.sun.messaging.jms.server:type=Log,subtype=Monitor

A string representing this object name is defined as a static constant LOG_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Notifications

The log monitor MBean supports the notifications shown in Table 3-88. These notifications are instances of the Message Queue JMX class LogNotification, and their names are defined as static utility constants in that class.

Note

A notification listener registered for a particular logging level will receive notifications only for that level and not for those above or below it: for example, a listener registered for the notification mq.log.level.WARNING will be notified only of WARNING messages and not ERROR or INFO. To receive notifications for more than one logging level, the listener must be explicitly registered for each level separately.

Table 3-88 Log Monitor Notifications

Name Utility Constant Description

mq.log.level.ERROR

LogNotification`.``LOG_LEVEL_ERROR`

Error message logged

mq.log.level.WARNING

LogNotification`.``LOG_LEVEL_WARNING`

Warning message logged

mq.log.level.INFO

LogNotification`.``LOG_LEVEL_INFO`

Informational message logged

Table 3-89 shows the methods defined in class LogNotification for obtaining details about a log monitor notification.

Table 3-89 Data Retrieval Methods for Log Monitor Notifications

Method Result Type Description

getLevel

String

Logging level of logged message

See Table 3-86 for possible values.

getMessage

String

Body of logged message

Java Virtual Machine

This section describes the MBean used for monitoring the Java Virtual Machine (JVM). The following subsection describes this MBean in detail.

JVM Monitor

Each broker has a single JVM monitor MBean, used for monitoring the Java Virtual Machine (JVM).

Note

This MBean is useful only with the Java Development Kit (JDK ) version 1.4 or lower. JDK version 1.5 includes built-in MBeans that provide more detailed information on the state of the JVM.

Object Name

The JVM monitor MBean has the following object name:

com.sun.messaging.jms.server:type=JVM,subtype=Monitor

A string representing this object name is defined as a static constant JVM_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Attributes

The JVM monitor MBean has the attributes shown in Table 3-90. The names of these attributes are defined as static constants in the utility class JVMAttributes.

Table 3-90 JVM Monitor Attributes

Name Type Settable? Description

TotalMemory

Long

No

Current total memory, in bytes

InitMemory

Long

No

Initial heap size at JVM startup, in bytes

FreeMemory

Long

No

Amount of memory currently available for use, in bytes

MaxMemory

Long

No

Maximum allowable heap size, in bytes

Any memory allocation attempt that would exceed this limit will cause an OutOfMemoryError exception to be thrown.


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2019, Oracle and/or its affiliates. All rights reserved.