Circuit Breaker - 6.3

Talend ESB Mediation Developer Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Design and Development
Talend ESB

The Circuit Breaker load balancer is a stateful pattern that monitors all calls for certain exceptions. Initially the Circuit Breaker is in closed state and passes all messages. If there are failures and the threshold is reached, it moves to open state and rejects all calls until halfOpenAfter timeout is reached. After this timeout is reached, if there is a new call, it will pass and if the result is success the Circuit Breaker will move to closed state, or to open state if there was an error.

An example using Java DSL:

    .circuitBreaker(2, 1000L, MyCustomException.class)

And the same example using Spring XML:

<camelContext id="camel" xmlns="">
    <from uri="direct:start"/>
        <circuitBreaker threshold="2" halfOpenAfter="1000">
        <to uri="mock:result"/>