JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for JMX Clients
search filter icon
search icon

Document Information

Preface

1.  Introduction to JMX Programming for Message Queue Clients

2.  Using the JMX API

3.  Message Queue MBean Reference

Brokers

Broker Configuration

Object Name

Attributes

Operations

Notification

Broker Monitor

Object Name

Attributes

Notifications

Connection Services

Service Configuration

Object Name

Attributes

Operations

Notification

Service Monitor

Object Name

Attributes

Operations

Notifications

Service Manager Configuration

Object Name

Attributes

Operations

Service Manager Monitor

Object Name

Attributes

Operation

Notifications

Connections

Connection Configuration

Object Name

Attribute

Connection Monitor

Object Name

Attributes

Operations

Connection Manager Configuration

Object Name

Attribute

Operations

Connection Manager Monitor

Object Name

Attributes

Operation

Notifications

Destinations

Destination Configuration

Object Name

Attributes

Operations

Notification

Destination Monitor

Object Name

Attributes

Operations

Notifications

Destination Manager Configuration

Object Name

Attributes

Operations

Notification

Destination Manager Monitor

Object Name

Attributes

Operation

Notifications

Message Producers

Producer Manager Configuration

Object Name

Attribute

Operation

Producer Manager Monitor

Object Name

Attribute

Operations

Message Consumers

Consumer Manager Configuration

Object Name

Attribute

Operations

Consumer Manager Monitor

Object Name

Attribute

Operations

Transactions

Transaction Manager Configuration

Object Name

Attribute

Operations

Transaction Manager Monitor

Object Name

Attributes

Operations

Notifications

Broker Clusters

Cluster Configuration

Object Name

Attributes

Operations

Notification

Cluster Monitor

Object Name

Attributes

Operations

Notifications

Logging

Log Configuration

Object Name

Attributes

Notification

Log Monitor

Object Name

Notifications

Java Virtual Machine

JVM Monitor

Object Name

Attributes

A.  Alphabetical Reference

Index

Message Consumers

This section describes the MBeans used for managing 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
purge1
consumerID (String)
None
Purge all messages

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

The subscriber itself is not destroyed.

1Durable 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?
DurableName1
String
Subscription name
ClientID1
String
Client identifier
DurableActive1
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)

1Durable 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 javax.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
javax.jms.Session.AUTO_ACKNOWLEDGE
AUTO_ACKNOWLEDGE
Auto-acknowledge mode
2
javax.jms.Session.CLIENT_ACKNOWLEDGE
CLIENT_ACKNOWLEDGE
Client-acknowledge mode
3
javax.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
javax.jms.Session.SESSION_TRANSACTED
SESSION_TRANSACTED
Session is transacted (acknowledgment mode ignored)