What's the difference between:
<camel:errorHandler id="deadLetterErrorHandler" type="DeadLetterChannel"
deadLetterUri="log:dead">
<camel:camelContext errorHandlerRef="deadLetterErrorHandler">
...
</camel:camelContext>
And:
<onException>
...
</onException>
According to this article, using them both in conjunction is a "powerful combination". How so? What roles do they each individual assume, and how do they complement each other?
from("direct:a") .unmarshall(new MyDataFormat("param1")) .perProcessorErrorHandler(deadLetterQueue("log:foo")) .process(myProcessor) .perProcessorErrorHandler(deadLetterQueue("log:bar")) .to(myAnotherProcessor) .perProcessorErrorHandler(deadLetterQueue("log:baz")) ~~~ this allows me not to think about types of exceptions for each processor – pls Sep 02 '22 at 06:35