-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to keep different CircuitBreakerConfiguration for multiple circuit breakers? #62
Comments
Hi why don't you use the Spring Boot starter and external configuration? |
See link for event consumer registration.
|
@RobWin So we have an internal tool (CCM) where we keep the configs and which can be changed at runtime as well. The hardcoded values that I have shown in the above screenshot, I am going to feed those values from our CCM config classes. So I can't use the application.properties config here. |
Cannot you make use of Spring Cloud Config instead? It allows the reconfiguration at runtime. |
@RobWin So the application keeps on polling the CCM to see if there are any changes every minute. It's a company wide used tool. Inhouse built. |
But how do you refresh the Registry? Do you replace the CircuitBreaker instances? |
@RobWin The current use case is to have four diffent configs with which we can initialize the circuit breakers. For now there is no need to refresh the config at runtime. |
I would propose to use Spring Cloud Config and build an adapter around your internal CCM tool. |
I have created a @bean of CircuitBreakerRegistry and have annotated four different methods using @CIRCUITBREAKER annotation. All have different names.
I want to keep 4 different kinds of CircuitBreakerConfig in the registry for each of the circuit breaker.
How can I achieve this?
Also, I want to log every event on these four CircuitBreakers. I know we can achieve that using:
registry.circuitBreaker(name).getEventPublisher().onEvent(logger)
But how do I get hold of the reference to those four circuit breakers?
@RobWin
The text was updated successfully, but these errors were encountered: