I'd like to ask you for your opinion on following DeadLetter channel example.
Is it bug, feature or I'm missing something?
I create route with DeadLetter error handler.
On error message goes to route "dead-letter-route".
- use case: format some meaningfull description of problem and send e-mail to admin or
- there is LoggingErrorHandler for dead-letter-route route -if sending mail / templating /
whatever fails, I need to know what happend, maby try redelivery.
In following example:
- new e-mail in source-route
- http post fails
- message is moved to dead-letter-route
- http post in dead-letter-route fails
- I expect error to be logged and it should be end of story BUT
- error is propagated back to source-route and to imap endpoint, which results to e-mail being
marked as unread => inifnite loop. Shouldn't dead letter channel in original route prevent such
Tried with camel 2.12.0 and 2.13.0.
Thanks for opinion.
--- spring xml --- dependencies: camel-mail, camel-http4
<camel:route id="dead-letter-route" errorHandlerRef="logging-dead-route">
<camel:log message="message in dead letter queue"/>