I'm using Resilience4j @Retry combined with @CircuitBreaker. I use annotations in SpringBoot 2 and my configuration is in application.yml. I have a fallback method in the @Retry annotation, but not in the @CircuitBreaker (That's the way to make them work together because of the aspect order as per my findings).
The @CircuitBreaker works fine using my configuration in application.yml. The Retry also works but does use only the default config values and do not reflect the values in the application.yml (EX.: maxAttempts is 3 instead of 5).
Any idea what I may be doing wrong here, please?
In the code:
@CircuitBreaker(name = "myService")
@Retry(name = "myService", fallbackMethod="myServiceFallback")
public HttpEntity myService(final String url) throws MyException{
//My logic
}