Reputation: 95
Is it possible to use Resilience4j on Spring Cloud Circuit Breaker by annotation? I can't find any documentation about it but only examples about using resilience4j by code
Upvotes: 4
Views: 4033
Reputation: 876
I don't think Spring Cloud Circuit Breaker offers annotations at this time. However, you may use the Spring Boot starter of Resilience4J (not part of Spring Cloud). This Resilience4J starter allows, among other features, to use annotations.
Please note that when using the Resilience4J starter, you lose the layer of abstraction offered by Spring Cloud Circuit Breaker (i.e. to replace resilience4j by another implementation). Also, if you decide to use the Resilience4J starter, you might want to reconsider whether Spring Cloud Circuit Breaker is still needed.
Upvotes: 5