[
https://issues.apache.org/jira/browse/CAMEL-9069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935031#comment-14935031
]
Kevin Telford commented on CAMEL-9069:
--------------------------------------
I can't believe I didn't respond earlier, terribly sorry.
What we'd like to have is that on a failure, a near real-time way to gather
information and notify (log or call a method) about the failure. It may be as
simple as just a notification of a failure and information from a header, or
perhaps (if available) more information from the failed HTTP attempt (status
code etc).
As far as what should happen if a new exception were thrown, or the exchange
altered, I think it should remain consistent with the existing .onRedelivery()
and .process() methods.
> Add processor to immediately handle exception while in retry loop
> -----------------------------------------------------------------
>
> Key: CAMEL-9069
> URL: https://issues.apache.org/jira/browse/CAMEL-9069
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Kevin Telford
> Assignee: Claus Ibsen
> Fix For: 2.17.0
>
>
> We have a recipientList of http4 endpoints. Occasionally an endpoint won't
> be available, and will return an exception (whether a ConnectException, or
> any other ex and a status code of >=400). To handle these errors we can use
> a defaultErrorHandler or leverage onException, and setup redelivery. What we
> then would like to do is some custom error handling on each occurrence of an
> exception.
> Both the defaultErrorHandler and onException support .onRedelivery(). While
> this is nice, when a retry delay grows large enough the lag between the
> exception and the .onRedelivery() call really begins to grow and so our
> custom error handling isn't as much “on error” as it is “on error and after a
> wait”.
> onException also supports a .process() call, however this only occurs once
> all redeliveries have failed.
> What would be ideal would be an additional .onExceptionOccur(Processor
> processor) method (or some such name) that allows for immediate processing
> upon an exception, even if its being handled within a retry loop.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)