Using the JMS Binding Component

Configuring Redelivery Handling by Editing the WSDL Document

You can configure redelivery handling by entering a specially formatted string in a WSDL document.

The string specifies what actions to take when the message is repeatedly redelivered. The string has the following format:


format := entry[; entry]*
entry := index ":" action
index := number (denotes the n-th time a message is seen)
action := number (denotes delay in milliseconds) | "delete" | "move"(args)
move := "queue"|"topic" | "same" ":" destname
destname := any string, may include "$", which is replaced with the original 
destination name

Redelivery Handling Example 1

Assume that the string is set as follows:


redeliveryHandling="5:1000; 10:5000"

This example causes no delay up to the 5th delivery. When the message is seen for the 5th, 6th, 7th, 8th, and 9th time, a 1000–millisecond delay is invoked. For each time the message is seen thereafter, a 5000–millisecond delay is invoked.

Redelivery Handling Example 2

Assume that the string is set as follows:


redeliveryHandling="5:1000; 10:5000; 50:move(queue:mydlq)"

This example causes no delay up to the 5th delivery. When the message is seen for the 5th, 6th, 7th, 8th, and 9th time, a 1000–millisecond delay is invoked. When the message is invoked for the 10th, 11th, ..., and 49th time, a 5000–millisecond delay is invoked. When the message is seen for the 50th time, the message is moved to a queue called mydlq.

Assume that the messages are received from Queue1 and the string is set as follows:


redeliveryHandling="5:1000; 10:5000; 50:move(queue:dlq$oops)"

In thise case, the messages are moved to the destination dlqQueue1oops. The dollar sign ($) character denotes the original destination name. Instead of queue, you can specify topic or same. The value same denotes a queue if the message was received from a queue, or can denote a topic if the message was received from a topic.