Closed eduardolbueno closed 2 years ago
@eduardolbueno please support one simple example to reproduce this issue,thanks.
Sorry for the late response. Here's the example.
This has already been fixed in OpenFeign and will be in the next Spring Cloud release https://github.com/spring-cloud/spring-cloud-openfeign/issues/606
I'm having difficulty setting up a CB with properties-based configuration. I'm using the spring-cloud BOM version 2020.0.4 which has PR #88 included, along with Spring Boot 2.5.6
Let's say I configure an OpenFeign client, like so:
If I include
spring-cloud-starter-circuitbreaker-resilience4j
in the classpath and enable the circuitbreaker throughfeign.circuitbreaker.enabled=true
, the CB will be auto-configured.So, first question: what is the name of the resilience4j instance that will be created in this case? Looking at the
Resilience4JConfigBuilder
class, it's building a CB with the idHardCodedTarget#getCustomer(String)
. Is that id supposed to be the equivalent to the resilience4j instance?Adding
@CircuitBreaker(name = "customer-service")
either to the feign class or the method yields no effect on that id. I want to be able to configure this CB through properties like so, for example:resilience4j.timelimiter.instances.customer-service.timeout-duration=10s
I guess that was the point of #88, after all. So it would be really nice to have a working example.