Skip to content

Circuitbreaker configuration being configurable through application.properties

Ronak Sakhuja requested to merge rosakhuj/cbConfigure into master

All Submissions:


  • [YES] I have added an explanation of what changes in this merge do and why we should include it?
  • [YES] I have updated the documentation accordingly.
  • [YES] I have added tests to cover my changes.
  • [YES] All new and existing tests passed.
  • [YES] My code follows the code style of this project.
  • [YES] I ran lint checks locally prior to submission.

What is the issue or story related to the change?


Circuit Breaker can be made configurable through adding a CircuitBreakerConfig class to the registry. We are adding few boolean flags to the configuration to set those properties in circuitbreaker.

azure.circuitbreaker.enable = false;

azure.circuitbreaker.defaultCircuitBreaker = false;
azure.circuitbreaker.slidingWindowSize = 50;
azure.circuitbreaker.minimumNumberOfCalls = 50;
azure.circuitbreaker.failureRate = 50;
azure.circuitbreaker.slidingWindowType = "TIME_BASED";
azure.circuitbreaker.permittedCallsInHalfOpenState = 10;

Details about each is in Readme.

We are using postConstruct in setCBR method, to run that after initializing all values of configuration.

High level design:

Issue:

Change details:

Test coverage:


All tests are passing and changes are covered.

Does this introduce a breaking change?


  • [YES/NO]

No

Pending items


Reviewer request


  • Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
  • Block the MR if you feel there is less testing or no details in the MR
  • Please cover the following aspects in the MR -- Coding design: <Reviewer1> -- Backward Compatibility: <Reviewer2> -- Feature Logic: <Logic design> -- <Any other context mention here> OR -- <Component 1>: <Reviewer1> -- <CosmosDB>: <Reviewer2> -- <ServiceBus> <Reviewer3> -- <Mention any other component and owner>

Other information


Edited by Ronak Sakhuja

Merge request reports