You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vanshul.Chawla" <Va...@target.com> on 2015/05/21 18:24:40 UTC

onException query for sending error message to queue before starting retry

Hello,

We have a requirement wherein we need to perform a retry for 10 times with gap of 30 min. If retries fail, then we need to put message in error queue. Issue here is operations team will be unaware of any issues will 5 hrs 30 min.
Is there a way OnException puts one error message before starting retry and may be one after all retry are exhausted.


Thanks and Regards,

Vanshul Chawla


Re: onException query for sending error message to queue before starting retry

Posted by Andrew Block <an...@gmail.com>.
Vanshul,

Take a look at the onRedelivery (or onRedeliveryRef for spring/blueprint) that can be applied to either onException [1]  or errorHandler [2]. It allows for for a custom processor to be executed prior to redelivering a message. You should be able to configure a ProducerTemplate to send to a downstream endpoint. It should provide the functionality for your use case.

Thanks,
Andy

[1] - http://camel.apache.org/exception-clause.html
[2] - http://camel.apache.org/error-handler.html  



-- 
Andrew Block


On May 21, 2015 at 11:26:51 AM, Vanshul.Chawla (vanshul.chawla@target.com) wrote:

Hello,  

We have a requirement wherein we need to perform a retry for 10 times with gap of 30 min. If retries fail, then we need to put message in error queue. Issue here is operations team will be unaware of any issues will 5 hrs 30 min.  
Is there a way OnException puts one error message before starting retry and may be one after all retry are exhausted.  


Thanks and Regards,  

Vanshul Chawla