# cLoadBalancer

Distributes the messages it received to multiple endpoints according to the load balancing policy.

For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.

## cLoadBalancer Standard properties

These properties are used to configure cLoadBalancer running in the Standard Job framework.

The Standard cLoadBalancer component belongs to the Routing family.

## Basic settings

| Properties | Description |
| --- | --- |
| Strategy | Select between Random, Round<br>Robin, Sticky, Topic, Failover, and Custom. Each method is described below. |
| Random | The receiving endpoint is chosen randomly at each exchange. |
| Round Robin | Messages are distributed according to the round robin method which<br>distributes the load evenly. |
| Sticky | <ul> <li> <p> <span>Language</span>: Select the language of the                     expression to use in the <span>Expression</span> field                     to distribute the messages from <span>None</span>,                        <span>Bean</span>, <span>Constant</span>, <span>CorrelationID</span>,                        <span>EL</span>, <span>Groovy</span>, <span>Header</span>, <span>JoSQL</span>, <span>JSonPath</span>, <span>JXPath</span>,                        <span>MVEL</span>, <span>OGNL</span>, <span>PHP</span>, <span>Property</span>, <span>Python</span>, <span>Ruby</span>, <span>Simple</span>, <span>SpEL</span>,                        <span>SQL</span>, <span>XPath</span>, and <span>XQuery</span>.</p> <p>For more information about how to use the languages to create an expression, see         the site <a href="http://camel.apache.org/languages.html" target="_blank">http://camel.apache.org/languages.html</a>.</p> </li> <li> <p> <span>Expression</span>: Type in the                     expression that will be used to calculate a correlation key that will determine                     the endpoint to choose. </p> </li> </ul> |
| Topic | Select this option to send all the messages to all the<br>endpoints. |
| Failover | <ul> <li> <p> <span>Basic mode</span>: By default, the                     failover load balancing always sends the messages to the first endpoint. If the                     first endpoint fails, the messages are sent to subsequent endpoints.</p> </li> <li> <p> <span>Specify exceptions</span>: Specify                     the exceptions to which the failover should react to in the <span>Exception</span> table.</p> </li> <li> <p> <span>Use with Round robin</span>: Select                     this option to use failover with advanced options.</p> <p>From the <span>Maximum failover									attempt</span> list, select the number of attempt to be								proceed before giving up the transfer: </p> <p> -<span>Attempt forever</span>: always attempts to								transfer the messages and always try to failover. </p> <p>									-<span>Never failover</span>: gives up								immediately the transfer of messages and never try to								failover.</p> <p> -<span>A number of									attempts</span>: attempts <em>n</em> number of								time to transfer messages, specify that number in the <span>Number of attempts</span>									field.</p> <p> <span>Inherit error									handler</span>: Select <em>true</em> if you want								Camel error handler to be used. If you select									<em>false</em>, the load balancer will immediately								failover when an exception is thrown. </p> <p> <span>Use Round robin</span>: Select									<em>true</em> if you want to combine failover with								round robin. Failover load balancing with round robin mode								distributes the load evenly between the services, and it provides								automatic failover.</p> </li> </ul> |
| Custom | Load balancer: Type in the<br>name of your custom load balancer. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cLoadBalancer is used as a middle component in a<br>Route. |
| Connections | <ul> <li> <span>Load Balance</span>: Select this link to route                  messages to the next endpoint according to the selected load-balancing strategy. </li> <li> <span>Route</span>: Select this link to route all the                  messages from the sender to the next endpoint. </li> </ul> |
| Limitation | n/a |

**Related concepts**

* [Distributing messages to receiver endpoints based on round robin](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-load-balancer/cloadbalancer-cjavadslprocessor-cmessagingendpoint-cprocessor-distributing-messages-to-receiver-endpoints-based-on-round-robin)