The round robin load balancer is not meant to work with failover, for that you should use the dedicated failover load balancer. The round robin load balancer will only change to next endpoint per message.
The round robin load balancer is stateful as it keeps state which endpoint to use next time.
Using the Fluent Builders
from("direct:start").loadBalance(). roundRobin().to("mock:x", "mock:y", "mock:z");
Using the Spring configuration
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:start"/> <loadBalance> <roundRobin/> <to uri="mock:x"/> <to uri="mock:y"/> <to uri="mock:z"/> </loadBalance> </route> </camelContext>
So the above example will load balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robbin policy. For further examples of this pattern in use see this JUnit test case.