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.
The destination configuration MBean is used for configuring a destination. There is one such MBean for each destination.
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.
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 |
---|---|---|---|
String |
No |
Destination name |
|
String |
No |
Destination type See Table 3–33 for possible values. |
|
Long |
Yes |
Maximum number of unconsumed messages A value of -1 denotes an unlimited number of messages. |
|
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. |
|
Long |
Yes |
Maximum total memory, in bytes, for unconsumed messages |
|
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. |
|
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. |
|
Integer |
Yes |
Maximum number of associated active message consumers in load-balanced delivery A value of -1 denotes an unlimited number of consumers. |
|
Integer |
Yes |
Maximum number of associated backup message consumers in load-balanced delivery A value of -1 denotes an unlimited number of consumers. |
|
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. |
|
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). |
|
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). |
|
Boolean |
Yes |
Send dead messages to dead message queue? If false, dead messages will simply be discarded. |
|
Boolean |
Yes |
XML schema validation is enabled? If set to false or not set, then XML schema validation is not enabled for the destination. |
|
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. |
|
Boolean |
Yes |
Reload XML schema on failure enabled? If set to false or not set, then the schema is not reloaded if validation fails. |
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 |
---|---|---|
Queue (point-to-point) destination |
||
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 |
Slow down producers |
|
REMOVE_OLDEST |
Throw out oldest messages |
|
REMOVE_LOW_PRIORITY |
Throw out lowest-priority messages according to age; no notice to producing client |
|
REJECT_NEWEST |
Reject newest messages; notify producing client with an exception only if message is persistent |
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 |
---|---|---|---|
pauseType (String) |
None |
Pause message delivery See Table 3–36 for possible values of pauseType. |
|
None |
None |
Pause all message delivery Equivalent to pause(DestinationPauseType.ALL). |
|
None |
None |
Resume message delivery |
|
None |
None |
Purge all messages |
|
None |
None |
Compact persistent data store Note – Only a paused destination can be compacted. |
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 |
Pause delivery from associated message producers |
|
CONSUMERS |
Pause delivery to associated message consumers |
|
ALL |
Pause all message delivery |
The destination configuration MBean supports the notification shown in Table 3–37.
Table 3–37 Destination Configuration Notification
Name |
Description |
---|---|
Attribute value changed |
The destination monitor MBean is used for monitoring a destination. There is one such MBean for each destination.
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.
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 |
---|---|---|---|
String |
No |
Destination name |
|
String |
No |
Destination type See Table 3–39 for possible values. |
|
CreatedByAdmin |
Boolean |
No |
Administrator-created destination? |
Temporary |
Boolean |
No |
Temporary destination? |
String |
No | ||
Integer |
No |
Current state See Table 3–40 for possible values. |
|
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. |
|
Integer |
No |
Current number of associated message producers |
|
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. |
|
Integer |
No |
Current number of wildcard message producers associated with the destination For topic destinations only. |
|
Integer |
No |
Current number of wildcard message consumers associated with the destination For topic destinations only. |
|
Integer |
No |
Current number of wildcard message producers and wildcard message consumers associated with the destination For topic destinations only. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Integer |
No |
Current number of associated backup message consumers |
|
Integer |
No |
Peak number of associated backup message consumers since broker started |
|
Integer |
No |
Average number of associated backup message consumers since broker started |
|
Long |
No |
Current number of messages stored in memory and persistent store Does not include messages held in transactions. |
|
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. |
|
Long |
No |
Current number of messages being held in memory and persistent store pending acknowledgment |
|
Long |
No |
Current number of messages being held in memory and persistent store in uncommitted transactions |
|
String |
No |
JMS Message ID of the next message to be delivered to any consumer |
|
Long |
No |
Peak number of messages stored in memory and persistent store since broker started |
|
Long |
No |
Average number of messages stored in memory and persistent store since broker started |
|
Long |
No |
Cumulative number of messages received since broker started |
|
Long |
No |
Cumulative number of messages sent since broker started |
|
Long |
No |
Cumulative size in bytes of messages received since broker started |
|
Long |
No |
Cumulative size in bytes of messages sent since broker started |
|
Long |
No |
Size in bytes of largest single message received since broker started |
|
Long |
No |
Current total size in bytes of messages stored in memory and persistent store Does not include messages held in transactions. |
|
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. |
|
Long |
No |
Current total size in bytes of messages being held in memory and persistent store in uncommitted transactions |
|
Long |
No |
Peak total size in bytes of messages stored in memory and persistent store since broker started |
|
Long |
No |
Average total size in bytes of messages stored in memory and persistent store since broker started |
|
Long |
No |
Amount of disk space, in bytes, reserved for destination |
|
Long |
No |
Amount of disk space, in bytes, currently in use by destination |
|
Integer |
No |
Ratio of disk space currently in use to disk space reserved for destination |
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 |
---|---|---|
Queue (point-to-point) destination |
||
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 |
RUNNING |
Destination running |
|
1 |
CONSUMERS_PAUSED |
Message consumers paused |
|
2 |
PRODUCERS_PAUSED |
Message producers paused |
|
3 |
PAUSED |
Destination paused |
|
-1 |
UNKNOWN |
Destination state unknown |
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
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 |
---|---|---|
Destination paused |
||
Destination resumed |
||
Destination compacted |
||
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 |
---|---|---|
String |
Destination name |
|
String |
Destination type See Table 3–39 for possible values. |
|
Boolean |
Administrator-created destination? |
|
String |
Pause type See Table 3–36 for possible values. |
Each broker has a single destination manager configuration MBean, used for managing all of the broker's destination configuration MBeans.
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.
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
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 |
---|---|---|---|
None |
ObjectName[] |
Object names of destination configuration MBeans for all current destinations |
|
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. |
|
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. |
|
destinationType (String) destinationName (String) |
None |
Destroy destination See Table 3–46 for possible values of destinationType. |
|
pauseType (String) |
None |
Pause message delivery for all destinations See Table 3–47 for possible values of pauseType. |
|
None |
None |
Pause all message delivery for all destinations Equivalent to pause(DestinationPauseType.ALL). |
|
None |
None |
Resume message delivery for all destinations |
|
None |
None |
Compact all destinations Note – Only paused destinations can be compacted. |
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 |
---|---|---|
Queue (point-to-point) destination |
||
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 |
Pause delivery from associated message producers |
|
CONSUMERS |
Pause delivery to associated message consumers |
|
ALL |
Pause all delivery |
The destination manager configuration MBean supports the notification shown in Table 3–48.
Table 3–48 Destination Manager Configuration Notification
Name |
Description |
---|---|
Attribute value changed |
Each broker has a single destination manager monitor MBean, used for managing all of the broker's destination monitor MBeans.
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.
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
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 |
---|---|---|---|
None |
ObjectName[] |
Object names of destination monitor MBeans for all current destinations |
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 |
---|---|---|
Destination created |
||
Destination destroyed |
||
Destination paused |
||
Destination resumed |
||
Destination compacted |
||
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 |
---|---|---|
String |
Destination name |
|
String |
Destination type See Table 3–46 for possible values. |
|
Boolean |
Administrator-created destination? |
|
String |
Pause type See Table 3–47 for possible values. |