camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugenio Perrotta Neto <eugenio.perrottan...@gmail.com>
Subject execute an action on exception and use redeçivery Policy
Date Sun, 16 Dec 2012 20:53:48 GMT
Hello. Its the first time i'm writing on this forum. I read everyday to solve
my question and always was very useful for me. But know i'm facing a biiiiig
problem. I will try to explain:


I want to create a route that listens to a queue of ActiveMQ.

from("activwmq:queue:myQueue");

I want each message, only one processing is performed

from("activwmq:queue:myQueue")
.processRef("myProcessor");

in this processor, for any exception throwed i want to redelivery this
message to the route for x times and with y miliseconds of delay:

from("activmq:queue:myQueue")
.onException(Exception.class).maximumRedeliveries(x).redeliveryDelay(y).end()
.processRef("myProcessor");

So far so good.

my problem is:I would like to run a processor when an exception was throwed
and not when it was done redelivery.
 
Run a processor on redeçlivery is very easy. Just use the onRedelivery().
Run a processor when the exception was throwed is easy to. Just use doTry
and tocatch.


But execute when a execute a processor on catch the message is not
redelivery. 

can someone help me? I'm sorry for my English. I am from Brazil

thanks 





--
View this message in context: http://camel.465427.n5.nabble.com/execute-an-action-on-exception-and-use-redecivery-Policy-tp5724183.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message