Is it possible to configure a retry policy of the RetryConfiguration.
I would like to retry the calls of my service with a quadratic pattern. Like waiting 0.5s, then 1s, then 2s, then 3s...ect, between each calls.
If it is not possible with a Retry pattern, what can I do?
Thanks.
According to the java documentation, I think it's not possible. But I prefer to ask directly.
Unfortunately, there is no convenience API to achieve this.
But you could still do this by following these steps:
RetryProvidersayQuadraticRetryProviderwhich implements the interfacesRetryProviderandGenericDecorator.The most important point is that you should override thegetRetrymethod where you add anintervalFunction. Refer to the publicDefaultRetryProviderclass for more details.QuadraticRetryProvider.