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