Table of Contents
Balances message processing among a number of nodes
The Load Balance pattern uses a specified algorithm for balancing the processing load among a number of processors.
The Load Balance pattern can appear anywhere in the body of a route. It should be connected to one or more identical processors across which processing can be spread.
![]() | Note |
|---|---|
Though the |
Table 40, “Load Balance Properties” describes the properties you can specify using the properties editor.
Table 40. Load Balance Properties
| Name | Description |
|---|---|
| Specifies and configures the load balancing strategy. Selections include:
|
| Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |
| Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
| Specifies whether the node should use the error handler configured for the route. The default is Disabled. |
Failover configuration Table 41, “Failover Load Balance Properties” describes the properties needed to configure a failover load balancer.
Table 41. Failover Load Balance Properties
| Name | Description |
|---|---|
| Specifies the exceptions that cause a failover. All other exceptions will cause a failure. |
| Specifies the maximum number of attempts before giving up.
|
| Enables/disables round robin mode. Default is Disabled. |
Custom configuration Table 42, “Custom Load Balance Properties” describes the properties needed to configure a custom load balancer.
Table 42. Custom Load Balance Properties
| Name | Description |
|---|---|
| Specifies a reference to the bean implementing the load balancing strategy. |
Sticky configuration Table 43, “Sticky Load Balance Properties” describes the properties needed to configure a sticky load balancer.
Table 43. Sticky Load Balance Properties
| Name | Description |
|---|---|
| Specifies the expression used to generate the correlation key used by the load blancer. |
Weighted configuration Table 44, “Weighted Load Balance Properties” describes the properties needed to configure a Weighted load balancer.
Table 44. Weighted Load Balance Properties
| Name | Description |
|---|---|
| Specifies a delimited list of positive integers determining the relative weight for each endpoint. The number of entries in the list must match the number of endpoints available for load balancing. |
| Specifies the character used to delimit the entries in the distribution ratio list. |
| Enables/disables round robin mode. Default is Disabled. |
circuitBreaker configuration Table 45, “Circuit Breaker Load Balance Properties” describes the properties needed to configure a circuit breaker load balancer.
Table 45. Circuit Breaker Load Balance Properties
| Name | Description |
|---|---|
| Specifies the exceptions that cause a failure. |
| Specifies the time, in milliseconds, to wait after reaching the threshold limit before the circuitBreaker allows a new message to pass. Depending on the success status of the new message, the circuitBreaker either passes or blocks subsequent messages. |
| Specifies the maximum number of failures allowed before the circuitBreaker blocks all subsequent messages. |