Reputation: 955
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.)
Upvotes: 1
Views: 675
Reputation: 55535
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
Upvotes: 2