1
votes

In case of dead letter endpoint, I want to add custom rooting (redirect message/exchange to other endpoint, add Wire Tap to bean, ect). Unfortunately I do not see is (and how) Dead Letter Channel class provide such redirection. Do I need to write my own Error Handler or can I somehow use Dead Letter Channel? (I understand that in case of error, messages are redirected to dead channel - the end.)

1

1 Answers

2
votes

You can set the endpoint uri in the Dead Letter Channel to be a direct endpount, so you route this to a new route, eg

erorHandler(deadLetterChannel("direct:dead"));

...
from("direct:dead")
  // do stuff here