Versions Compared

Key

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

...

Once all attempts at redelivering the message fails then the message is forwarded to the dead letter queue.

About moving Exchange to dead letter queue and using handled

Handled on Dead Letter Channel was introduced in Camel 2.0, this feature does not exist in Camel 1.x

When all attempts of redelivery have failed the Exchange is moved to the dead letter queue (the dead letter endpoint). The client is then notified as the caused exception is set on the Exchange. However if you want to handle this you can set the handled to true on the Dead Letter Channel.

For instance configuring the dead letter channel as:

Code Block
java
java

errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).dealy(5000).handled(true));

The Dead Letter Channel above will clear the caused exception when the Exchange is moved to the jms:queue:dead destination and the client will not notice the failure.

By default handled is not configured and thus its false.

Tip
titleHandled

See also Exception Clause for more details on the handled policy as this feature was first introduced here and thus we have more docuemntation and samples there.

OnRedelivery

Available in Camel 1.5.1 onwards

...