Skip navigation.
Downloads | Product Documentation | Support

Administration Console Online Help

# JMS Template --> Configuration --> Expiration Policy

Tasks Related Topics Attributes

## Overview

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

The configurable expiration policy attributes for a JMS template are the same as those configured for a destination. However, if the destination that is using a JMS template specifies an expiration policy value for an attribute, that expiration policy value is used.

## Tasks

Creating a JMS Topic

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

Attribute Label | Description | Value Constraints
--- | --- | ---
Expiration Policy | An optional policy to use when expired messages are found on a topic or queue destination. None and Discard - Expired messages are removed from the messaging system. The removal is not logged and the message is not redirected to another location. If None is defined for a given destination, 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 (on the Redelivery tab). 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 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. JMSTemplateMBean` Attribute: `ExpirationPolicy` | Valid values: Discard Log Redirect Dynamic: yes
Expiration Logging Policy | The policy that defines what information about the message is logged when the Expiration Policy on this destination is set to Log. The valid logging policy values are: %header% - All JMS header fields are logged. %properties% - All user-defined 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-defined property is logged. When using multiple property values, enter them as a comma-separated list. The `%header%` and `%properies%` values are not case sensitive. For example, you can use `"%header%,%properties%"` for all the JMS header fields and user properties. However, the enumeration of individual JMS header fields and user-defined 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 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. JMSTemplateMBean` Attribute: `ExpirationLoggingPolicy` | Dynamic: yes