Hi,

If I'm not mistaken you should already be able to get the exception from
the exchange using the Exchange.EXCEPTION_CAUGHT property. Assuming you're
using Camel's DeadLetterErrorHandler like this:


errorHandler(deadLetterChannel("jms:queue:dead").maximumRedeliveries(3).redeliveryDelay(5000));

You should be able to just call
exchange.getProperty(Exchange.EXCEPTION_CAUGHT) on the exchanges in the
"dead" queue and get the exception.

Regards,
Richard


On Sun, Dec 29, 2013 at 9:19 AM, rhuiser <[email protected]> wrote:

> Hi all,
>
> When a message ends-up on the designated DLQ when the max redelivery count
> has reached, is it possible to add a custom header to this message?
>
> What I would like is to have a header with the reason (exception) why the
> messages could not be processed. This simplifies troubleshooting
> tremendously.
>
> Any ideas?
>
> Robin
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Add-custom-header-when-message-is-rolled-back-to-queue-in-transaction-tp5745311.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to