Closed awehrung closed 1 week ago
Hi @awehrung
One of the objectives of the new retry strategies design is to decouple it from the sdk-core
and aws-core
package, and as part of this we won't be adding back that coupling. You can still use the RetryPolicy
classes for your use case, those will be still supported for the foreseeable future.
Won't fix for the reasons give above.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the feature
The new
BackoffStrategy
used byRetryStrategy
should allow the methodcomputeDelay
to rely on more information than just the running attempt count, as does the old one used byRetryPolicy
.Use Case
While trying to switch from the now deprecated
RetryPolicy
to aRetryStrategy
-based client, I noticed that I am unable to keep the same behaviour because my custom...retry.backoff.BackoffStrategy::computeDelayBeforeNextRetry
implementation relies on theRetryPolicyContext
to decide on the actual duration and log some stuff as a side effect. The replacement...retries.api.BackoffStrategy::computeDelay
only allows access to the running attempt count.Proposed Solution
As
RetryPolicyContext
has not been yet deprecated, I hope it still fits with the newRetryStrategy
concept somehow.Other Information
I may be doing this very wrong. In that case, kindly redirect me to the correct solution.
Acknowledgements
AWS Java SDK version used
2.26.3
JDK version used
openjdk version "22.0.1" 2024-04-16
Operating System and version
Ubuntu 22.04.1