Hi No not with those OOTB load balancers from camel-core. They are a bit limited. You can build your custom load balancer, and extend some of the OOTBs or copy their code.
If you want to use hystrix circuit breaker, then it has such a functionality but for calling one service. But you can use it for failing over via network to service 2 - if you have a limited number of services. See the hystrix docs and examples. http://camel.apache.org/hystrix-eip.html Another options is the service call eip which can lookup services per request and then select among the live services. http://camel.apache.org/servicecall-eip.html On Sat, Jan 28, 2017 at 5:20 PM, bob_sheknowdas <[email protected]> wrote: > Hi, > > I implemented a load balancer using camel and its failover and round robin > features. > Everythink works perfectly well. > > But now Im trying to improve my load balancer in a way, that it keeps track > of the unavailable endpoints. > > Currently, my balancing routine looks like this: > *from("startpoint").loadBalance().failover(3, false, > true).to("endpoint1", "endpoint2");* > > Now, the problem is, that if one of the endpoints becomes unavailable, the > routine doesnt become aware of that and keeps trying to contact the every > endpoint. With a maximumFailoverAttempt of 3 this means, that every second > request becomes very slow. > > Is there a way to make camel remember the unavailable endpoint. > It would be perfect, if camel could assaign a timeout to an unavailable > endpoint and not contact that one any longer, until the timeout has passed. > > I've read, that the circuit breaker load balancer offers such a feature. > But I dont know how to combine that with my already pretty well working > failover load balancer. > > Can you guys help me? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Loadbalancing-with-failover-but-remembering-the-unavailable-endpoint-tp5793144.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
