Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We could move ThreadPoolProfile from org.apache.camel.spi to org.apache.camel and have it in the root package.

Tighten up onException

We should consider tighten up the onException DSL a bit, for example to make it more clear that if you have processing steps in there, they only occur after the message has been exhausted. So maybe we need to have a onExhausted to make this clear

Code Block

onException(IOException.class).maximumRedeliveries(3)
  .onExhausted().handled(true).to("log:ignoreMe");

So in this example its only after the 3 failed redeliveries, then its exhausted, and then we handle the message and route it to a log where we ignore the message.

Also currently you can do this:

Code Block

onException(IOException.class).maximumRedeliveries(3)
  .handled(true);

Which will handle the message and after this let the error handler deal with the message. See CAMEL-5059.
We should in this case use a NoopProcessor so the message is handled, but the regular error handler does not react. Then its consistent.
However we have not changed this in Camel 2.x to keep backwards compatibility.

Likewise there has been ideas to move onRedeliverRef to <redeliveryPolicy> as currently its to be configured outside the policy.
It may make more sense to move onRedeliverRef to the policy to keep it together.