Spring's version of Resilience4JCircuitBreaker
is a wrapper over io.github.resilience4j.circuitbreaker.CircuitBreaker
and also keeps an instance of the Circuitbreaker registry. I was hoping to use an already existing CircuitBreaker instance if it was already created. Looks like there is no way to do it if using Spring Resilience4JCircuitBreaker
.
E.g. If using plain Resilience4J I can do something like
CircuitBreakerRegistry registry = CircuitBreakerRegistry.ofDefaults(); // do it in the start of
//the app.
in services.
registry.circuitBreaker("context");
Seems like there is no way to do that with Resilience4JCircuitBreaker?