Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7974

Provide CircuitBreaker state in an exchange property

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.14.0
    • 2.16.0
    • camel-core, eip
    • None
    • Novice

    Description

      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()

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              yvesdm Yves De Moor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified