You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by 23patel patel <23...@gmail.com> on 2017/11/21 09:15:06 UTC

Apache camel capturing failover attempts before another failover does round robin

 I am using apache camel failover component with following route
configuration:

<route id="jettyRouter" errorHandlerRef="defaultErrorHandler">
    <from uri="jetty:http://{{Jetty.entryPoint.host}}?matchOnUriPrefix=true"/>
    <setExchangePattern pattern="InOut"/>
    <loadBalance>
        <failover maximumFailoverAttempts="2" roundRobin="true" >
            <exception>java.net.ConnectException</exception>
            <process ref="customExceptionProcessor" />
        </failover>
        <to uri="direct:endpointRoute1" />
        <to uri="direct:endpointRoute2" />
    </loadBalance>
</route>

I want to raise an email when ever connect exception is raised.
However process associated to send email in my example is called only
after connection exception thrown after maximumFailoverAttempts are
exhausted. I want to send email for every connect exception before
failover does round robin and choose next uri.

Is this possible in camel 2.14 or 2.17.0 ?