shashank created CAMEL-24929:
--------------------------------
Summary: RedeliveryPolicy javadoc shows a malformed delayPattern
example
Key: CAMEL-24929
URL: https://issues.apache.org/jira/browse/CAMEL-24929
Project: Camel
Issue Type: Bug
Components: camel-core
Reporter: shashank
The class javadoc of
{{org.apache.camel.processor.errorhandler.RedeliveryPolicy}} explains the delay
pattern with this example:
{noformat}
delayPattern=5:1000;10:5000:20:20000
{noformat}
The groups are separated by {{;}}, so the last separator should be a semicolon:
{{5:1000;10:5000;20:20000}} (the dead letter channel docs have it right).
Copied as is, the pattern gives a delay of 0 for the first four redeliveries,
and the fifth redelivery fails with {{NumberFormatException: For input string:
"5000:20:20000"}}, which replaces the original exception on the exchange.
Proposed fix: correct the example in the javadoc, and add a test that the
example gives the delays the javadoc describes (0..4 = 0, 5..9 = 1000, 10..19 =
5000, >= 20 = 20000).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)