Currently, retries are implicitly enabled from Feign, using the Default Retryer and with a maximal number of attempts of 5.
The code changes enable the use of resiliency4j retries:
retry RetryableException only
use an exponential backoff strategy, or the Retry-After header information when available, in which case use the maximum between the time given from the two.
simply use the Default Retryer but configure a maximum number of retries of 3 (default is 5).
Extend the Retryer interface and implement our custom logic (parameters are a bit different + in case of a negative interval from the header the default retryer doesn't wait)
I think we might be good with just (1) if we do not need any other resiliency pattern, which involves only adding 1 line when creating the Feign builder:
.retryer(new Default( ... , ... , 3)) // can configure startInterval and maxInterval, last is the number of attempts
Related Issue
150
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Currently, retries are implicitly enabled from Feign, using the
Default Retryer
and with a maximal number of attempts of 5.The code changes enable the use of resiliency4j retries:
RetryableException
onlyRetry-After
header information when available, in which case use the maximum between the time given from the two.Other approaches:
Retryer
interface and implement our custom logic (parameters are a bit different + in case of a negative interval from the header the default retryer doesn't wait)I think we might be good with just (1) if we do not need any other resiliency pattern, which involves only adding 1 line when creating the Feign builder:
Related Issue
150
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: