Yves De Moor created CAMEL-7974:
-----------------------------------

             Summary: Provide CircuitBreaker state in an exchange property
                 Key: CAMEL-7974
                 URL: https://issues.apache.org/jira/browse/CAMEL-7974
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.14.0
            Reporter: Yves De Moor


To be more flexible, the idea is to create some exchange properties

Put circuit state in an exchange property (2 status : Open / closed, as 
halfOpen do the same as closed in term of business)
use a Content Based Router to perform something like

from("direct:a")
    .loadBalance()//
    .circuitBreaker(3, 3000L, MyCustomException.class)
    .choice()
        .when(property(Exchange.CircuitBreaker_state).isEqualTo("closed"))
            .to("direct:normalMode")
        .when(property(Exchange.CircuitBreaker_state).isEqualTo("opened"))
            .to("direct:degradedMode")
    .end()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to