Currently studying the integration of Feign and Spring Retry after reading this article but unfortunately declaring the following on my application.yml file
sample:
ribbon:
MaxAutoRetries: 2
ReadTimeout: 2000
OkToRetryOnAllOperations: true
The failed request was never retried but when I tried the answer on this question. I created this configuration class
@Configuration
public class FeigConfig {
@Bean
public Retryer retryer() {
return new Retryer.Default(1000L, 1000L, 3);
}
@Bean
public Logger.Level feignLoggerLevel() {
return Logger.Level.BASIC;
}
}
It suddenly works. Right now I just want to know
1) Why does the configuration on the application.yml doesn't work or is there something that I miss during the set-up but when I created the configuration class it seems ok.
2) In the event of retrying the request, is it possible to finish all of the retry calls before calling the fall back method.