bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Administration Console Online Help

 Previous Next Contents Index  

 


JMS Queue --> Configuration --> Expiration Policy

Tasks     Related Topics     Attributes

Overview

This tab defines the action that a queue should take when an expired message is encountered: discard the message, discard the message and log its removal, or redirect the message to an error destination.

Note: You configure queues explicitly or by configuring a JMS template that can be used to define multiple queues with similar attribute settings, as described in JMS Template Tasks.

Tasks

Creating a JMS Queue

Handling Expired Messages

Related Topics

"WebLogic JMS Fundamentals" in Programming WebLogic JMS

"Managing WebLogic JMS" in Programming WebLogic JMS

"Developing a WebLogic JMS Application"in Programming WebLogic JMS

Attributes

Table 0-18

Attribute Label

Description

Value Constraints

Expiration Policy

The message Expiration Policy to use when an expired message is encountered on a destination. The valid expiration policies are:

None - Same as the Discard policy; expired messages are simply removed from the destination.

Discard - Removes expired messages from the messaging system. The removal is not logged and the message is not redirected to another location. If no value is defined for a given destination (i.e., None), then expired messages are discarded.

Log - Removes expired messages from the system and writes an entry to the server log file indicating that the messages have been removed from the system. The actual information that is logged is defined by the Expiration Logging Policy.

Redirect - Moves expired messages from their current location to the Error Destination defined for the destination. The message retains its body, and all of its properties. The message also retains all of its header fields, but with the following exceptions:

  • The destination for the message becomes the error destination.

  • All property overrides associated with the error destination are applied to the redirected message.

  • If there is no Time-To-Live Override value set for the error destination, then the message receives a new Expiration Time of zero (indicating that it will not expire again).

It is illegal to use the Redirect policy when there is no valid error destination defined for the destination. Similarly, it is illegal to remove the error destination for a destination that is using the Redirect policy.

Note: The Maximum Message quota is only enforced for sending new messages. It is ignored when moving messages because of the Redirect policy.

MBean: weblogic.management.
configuration.
JMSQueueMBean

Attribute: ExpirationPolicy

Valid values:

  • Discard

  • Log

  • Redirect

Dynamic: yes

Expiration Logging Property

The message property (or properties) that defines what information about the message is logged when the Expiration Logging Policy is set to Log. The valid logging property values are:

  • %header% - All the JMS header fields are logged.

  • %properties% - All the user properties are logged.

  • JMSDeliveryTime - This WebLogic JMS-specific extended header field is logged.

  • JMSRedeliveryLimit - This WebLogic JMS-specific extended header field is logged.

  • foo - Any valid JMS header field or user property is logged.

When using multiple message property values, enter them as a comma-separated list. The %header% and %properies% values are not case sensitive. For example, you could use "%header%,%properties%" for all the JMS header fields and user properties. However, the enumeration of individual JMS header fields and user properties are case sensitive. To enumerate only individual JMS header fields you could use "%header, name, address, city, state, zip".

Note: The JMSMessageID field is always logged and cannot be turned off. Therefore, if the Expiration Policy is not defined (i.e., null) or is defined as an empty string, then the output to the log file contains only the JMSMessageID of the message.

MBean: weblogic.management.
configuration.
JMSQueueMBean

Attribute: ExpirationLoggingProperty

Dynamic: yes


Table 0-19

Attribute Label

Description

Value Constraints

Expiration Policy

The message Expiration Policy to use when an expired message is encountered on a destination. The valid expiration policies are:

None - Same as the Discard policy; expired messages are simply removed from the destination.

Discard - Removes expired messages from the messaging system. The removal is not logged and the message is not redirected to another location. If no value is defined for a given destination (i.e., None), then expired messages are discarded.

Log - Removes expired messages from the system and writes an entry to the server log file indicating that the messages have been removed from the system. The actual information that is logged is defined by the Expiration Logging Policy.

Redirect - Moves expired messages from their current location to the Error Destination defined for the destination. The message retains its body, and all of its properties. The message also retains all of its header fields, but with the following exceptions:

  • The destination for the message becomes the error destination.

  • All property overrides associated with the error destination are applied to the redirected message.

  • If there is no Time-To-Live Override value set for the error destination, then the message receives a new Expiration Time of zero (indicating that it will not expire again).

It is illegal to use the Redirect policy when there is no valid error destination defined for the destination. Similarly, it is illegal to remove the error destination for a destination that is using the Redirect policy.

Note: The Maximum Message quota is only enforced for sending new messages. It is ignored when moving messages because of the Redirect policy.

MBean: weblogic.management.
configuration.
JMSQueueMBean

Attribute: ExpirationPolicy

Valid values:

  • Discard

  • Log

  • Redirect

Dynamic: yes

Expiration Logging Property

The message property (or properties) that defines what information about the message is logged when the Expiration Logging Policy is set to Log. The valid logging property values are:

  • %header% - All the JMS header fields are logged.

  • %properties% - All the user properties are logged.

  • JMSDeliveryTime - This WebLogic JMS-specific extended header field is logged.

  • JMSRedeliveryLimit - This WebLogic JMS-specific extended header field is logged.

  • foo - Any valid JMS header field or user property is logged.

When using multiple message property values, enter them as a comma-separated list. The %header% and %properies% values are not case sensitive. For example, you could use "%header%,%properties%" for all the JMS header fields and user properties. However, the enumeration of individual JMS header fields and user properties are case sensitive. To enumerate only individual JMS header fields you could use "%header, name, address, city, state, zip".

Note: The JMSMessageID field is always logged and cannot be turned off. Therefore, if the Expiration Policy is not defined (i.e., null) or is defined as an empty string, then the output to the log file contains only the JMSMessageID of the message.

MBean: weblogic.management.
configuration.
JMSQueueMBean

Attribute: ExpirationLoggingProperty

Dynamic: yes



 

Back to Top Previous Next