Hi,

Did you try to use the "try … catch" DSL[1]

[1]http://camel.apache.org/try-catch-finally.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, December 17, 2012 at 4:53 AM, Eugenio Perrotta Neto wrote:

> 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 
> (http://Nabble.com).



Reply via email to