Load balancing across a number of endpoints
When you need the ability to distribute a sequence of messages between a predefined set of endpoints, the Load Balancer EIP is a good choice. This is useful for tasks such as web service load balancing at the application level, when a hardware load balancer is not available for use. This EIP allows you to plug in a number of strategies to define how the messages should be distributed amongst the endpoints.
This recipe will show you how to load balance (route) a message across a set of endpoints using a specified policy (for example, round robin).
Getting ready
The Java code for this recipe is located in the org.camelcookbook.routing.loadbalancer package. The Spring XML files are located under src/main/resources/META-INF/spring ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access