On Mon, Aug 3, 2009 at 10:39 PM, Carlo Camerino<[email protected]> wrote:
> Hi,
>
> Is there an option for camel to failover after a certain number of times
> that an exception occurs.
> Camel has failover for different types of exceptions,
>
> from("activemq:ab").failover(IOException.class).to("x", "y","z");
>
> can i specify the failover to occur this number of times before moving to y
> for example.
>
> If i encounter five io exceptions, then i move to y, then move to z
>
> Is there are such a feature ?

Yeah you can set the redelivery policy using an onException. Then it
should try 5 times before doing a failover.
Mind that it requires 2.0m3 as I think we added this after 2.0m2 was released.

And you got the entire arsenal of redelivery policies you can set so
you can also set the delay interval and whatnot.

onException(IOException.class).maximumRedeliveries(5);

from("activemq:ab").failover(IOException.class).to("x", "y","z");



>
> Thanks
> Carlo
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to