My use case is: I need to reliably push all messages, in order, without loosing any into a somewhat unreliable vendor provided HTTP service. We don't want to have to worry about network blips or sporadic downtimes in the vendor service. We'd also like our service to just always try to push the messages in, such that when vendor service becomes responsive again, the messages will just flow without any human intervention.
What we've decided to do is use the DefaultErrorHandler to infinitely retry sending the request in (with backoffs, etc.). However, we've added a processor to onException which sends metrics to our metric/alerting system so we can know when the service is trying to send for a long time, but cannot. Basically, we'll be notified when the downtime creeps up to the SLA, but never before. This works as expected, but we need to clear the metric (i.e. set the value back to 0) after the message has been successfully sent to to the HTTP service. How this is currently dealt with is a processor which checks for a header that is set when there was a retry, then it clears the metric. There slight annoyance in that this processor has to be added to every route that the error handler is added to. I'd like to avoid this by invoking the "cleanup" processor from the error handler, once it has dealt with the error. I read through the error handling section of Camel In Action as well as other posts & the API, but I cannot find anything I can add to the error handler itself which will be called after the error handler has successfully handled the error. Does such a construct exist? Or do I need to build a custom error handler? Any other ideas would be appreciated... ---- Sent using Guerrillamail.com Block or report abuse: https://www.guerrillamail.com//abuse/?a=VFJxFx4gQLUYjQL68W4ecRzCA8WC1Q%3D%3D