spring-native icon indicating copy to clipboard operation
spring-native copied to clipboard

Add support for "spring-cloud-starter-circuitbreaker-resilience4j"

Open goafabric opened this issue 4 years ago • 3 comments

Following the implementation Guidline of spring-cloud i implemented a Resilience4j CircuitBreaker basically by implementing the suggested CircuitBreakerFactory.create().run

Will it works perfectly fine in JVM ... it does not work in native mode. The application compiles and even bootstraps .. it even seems to wrap everything inside the CircuitBreaker.run Lambda, but the CircuitBreaker is never been tripped.

Also the registered Health Indicator shows nothing.

As this library is currently not listed within the list of compatible libraries, i guess this is somehow expected ...

However, as with Flyway this is a very essential part for every Service Application so support would be highly appreciated.

thx

Andreas

goafabric avatar Aug 09 '21 12:08 goafabric

@ryanjbaxter @spencergibb Could you please qualify this issue, does it make sense to add it to the backlog?

sdeleuze avatar Aug 17 '21 14:08 sdeleuze

I think so, yes.

ryanjbaxter avatar Aug 17 '21 18:08 ryanjbaxter

@mhalbritter I can happily confirm that resilience4j now works .. automagically ... at least the imperative version with "cbFactory". I guess we (again) had some changes here in the background either in native or graalvm itself.

The Resilience4j Circuitbreaker annotation also works at least in JVM mode .. which is not really documented. But NOT in Native mode .... Bu it guess that is more related to the current state of AOP Support and not supporing Annotations: https://github.com/spring-projects-experimental/spring-native/issues/956

goafabric avatar Jun 18 '22 08:06 goafabric

I can also confirm that this works perfectly fine with Spring Boot 3.0, via the "cbFactory" However @Circuitbreaker does not work. Would be great if this will supported also .. and afterwards the ticket could be closed.

goafabric avatar Nov 08 '22 13:11 goafabric

Hey @goafabric, thanks for the update. Spring Native is in minimal maintenance mode. If you find that something doesn't work in Spring Boot 3.x, please open an issue on the corresponding issue tracker. For @CircuitBreaker please see https://github.com/spring-projects/spring-retry or https://github.com/spring-cloud/spring-cloud-circuitbreaker.

mhalbritter avatar Nov 14 '22 08:11 mhalbritter

@mhalbritter ok will do .. created on new issue inside spring cloud .. https://github.com/spring-cloud/spring-cloud-circuitbreaker/issues/159

so i will close this one

goafabric avatar Nov 18 '22 13:11 goafabric