Requirment:
Message is queue need to be deleted after 7 days and need to be archived.
Solution:
We have a Oracle SOA service which pushes the messages to the JMS Queue. Requirment is this message need to be deleted and archived after 7 days
Steps followed:
- Add a time to like for the JMS Queue(InQueue) in BPEL JMS Apadtor of the JMS producer composite
2.
Define the New Error
Queue (ErrQueue) in EM console.
3. For InQueue
Select “Redirect” as
expiration policy and select the “Error Destination” as the queue which is
created in step 2.
By this way if the JMS message
is older than 7 days(Or any configurable days) in InQueue it can be
redirected/logged to new ErrQueue
Like to highlight the different
expiration policy available for us to choose from.
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
for the error destination, then the message receives a new Expiration Time of
zero (indicating that it will not expire again).
ReplyDeleteIt's very nice post,keep update at
Oracle SOA Online Training