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

Provide CircuitBreaker state in an exchange property

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.14.0
    • Fix Version/s: 2.16.0
    • Component/s: camel-core, eip
    • Labels:
      None
    • Estimated Complexity:
      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()

        Issue Links

          Activity

          Hide
          davsclaus Claus Ibsen added a comment -

          The state is now stored as exchange property

          Show
          davsclaus Claus Ibsen added a comment - The state is now stored as exchange property

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              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

                  Development