Defining a Message Expiration Policy Configuring an Expiration Policy on Topics

14-16 Performance and Tuning for Oracle WebLogic Server over how the system searches for expired messages and how it handles them when they are encountered. Active message expiration ensures that expired messages are cleaned up immediately. Moreover, expired message auditing gives you the option of tracking expired messages, either by logging when a message expires or by redirecting expired messages to a defined error destination. ■ Section 14.14.1, Defining a Message Expiration Policy ■ Section 14.14.7, Tuning Active Message Expiration

14.14.1 Defining a Message Expiration Policy

Use the message Expiration Policy feature to define an alternate action to take when messages expire. Using the Expiration Policy attribute on the Destinations node, an expiration policy can be set on a per destination basis. The Expiration Policy attribute defines the action that a destination 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. Also, if you use JMS templates to configure multiple destinations, you can use the Expiration Policy field to quickly configure an expiration policy on all your destinations. To override a templates expiration policy for specific destinations, you can modify the expiration policy on any destination. For instructions on configuring the Expiration Policy, click one of the following links: ■ Section 14.14.2, Configuring an Expiration Policy on Topics ■ Section 14.14.3, Configuring an Expiration Policy on Queues ■ Section 14.14.4, Configuring an Expiration Policy on Templates ■ Section 14.14.5, Defining an Expiration Logging Policy

14.14.2 Configuring an Expiration Policy on Topics

Follow these directions if you are configuring an expiration policy on topics without using a JMS template. Expiration policies that are set on specific topics will override the settings defined on a JMS template. 1. Follow the directions for navigating to the JMS Topic: Configuration: Delivery Failure page in Configure topic message delivery failure options in the Oracle WebLogic Server Administration Console Help. 2. From the Expiration Policy list box, select an expiration policy option. ■ Discard — Expired messages are removed from the system. The removal is not logged and the message is not redirected to another location. ■ Log — Removes expired messages and writes an entry to the server log file indicating that the messages were removed from the system. You define the actual information that will be logged in the Expiration Logging Policy field in next step. ■ Redirect — Moves expired messages from their current location into the Error Destination defined for the topic. For more information about the Expiration Policy options for a topic, see JMS Topic: Configuration: Delivery Failure in the Oracle WebLogic Server Administration Console Help. Tuning WebLogic JMS 14-17 3. If you selected the Log expiration policy in previous step, use the Expiration Logging Policy field to define what information about the message is logged. For more information about valid Expiration Logging Policy values, see Section 14.14.5, Defining an Expiration Logging Policy . 4. Click Save.

14.14.3 Configuring an Expiration Policy on Queues