Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Each group has two values separated with colon

  • limit = upper limit
  • delay = delay in millis
    And the groups is again separated with semi colon.
    The rule of thumb is that the next groups should have a higher limit than the previous group.

Lets clarify this with an example:
delayPattern=5:1000;10:5000;20:20000

That gives us 3 groups:

  • 5:1000
  • 10:5000
  • 20:20000

Resulting in these delays for redelivery attempt:

  • Redelivery attempt number 1..4 = 0 millis (as the first group start with 5)
  • Redelivery attempt number 5..9 = 1000 millis (the first group)
  • Redelivery attempt number 10..19 = 5000 millis (the second group)
  • Redelivery attempt number 20.. = 20000 millis (the last group)

Note: The first redelivery attempt is 1, so the first group should start with 1 or higher.

You can start a group with limit 1 to eg have a starting delay: delayPattern=1:1000;5:5000

  • Redelivery attempt number 1..4 = 1000 millis (the first group)
  • Redelivery attempt number 5.. = 5000 millis (the last group)

There is no requirement that the next delay should be higher than the previous. You can use any delay value you like. For example with delayPattern=1:5000;3:1000 we start with 5 sec delay and then later reduce that to 1 second.

...

Now suppose the route above and a failure happens in the foo bean. Then the Exchange.TO_ENDPOINT and Exchange.FAILURE_ENDPOINT will still contain the value of http://someserver/somepathImage Removed.

Which route failed

...

Wiki Markup
{snippet:id=e2|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnRedeliveryTest.java}
Include Page
CAMEL:Using This PatternCAMEL:
Using This Pattern