Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalents of BackoffStrategy.defaultStrategy(), BackoffStrategy.defaultThrottlingStrategy() and RetryCondition.defaultRetryCondition() #5409

Closed
eternachen opened this issue Jul 18, 2024 · 2 comments
Labels
documentation This is a problem with documentation.

Comments

@eternachen
Copy link

eternachen commented Jul 18, 2024

Describe the issue

Deprecated method is not allowed...

BackoffStrategy/RetryPolicy/RetryCondition have been deprecated.

I have a code

    public static final RetryPolicy RETRY_POLICY = RetryPolicy.builder()
            .retryCondition(RetryCondition.defaultRetryCondition())
            .backoffStrategy(BackoffStrategy.defaultStrategy())
            .throttlingBackoffStrategy(BackoffStrategy.defaultThrottlingStrategy())
            .numRetries(MAX_RETRY)
            .build();

I am thinking of below code to replace above code

    public static final RetryStrategy RETRY_STRATEGY = AwsRetryStrategy.defaultRetryStrategy()
            .toBuilder()
            .maxAttempts(MAX_RETRY)
            .build();

RetryCondition.defaultRetryCondition() / BackoffStrategy.defaultStrategy()/BackoffStrategy.defaultThrottlingStrategy() should be built in AwsRetryStrategy.defaultRetryStrategy()

Please correct me if I am wrong.

Links

https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/retry/backoff/BackoffStrategy.html

@eternachen eternachen added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Jul 18, 2024
@sugmanue
Copy link
Contributor

Hi @eternachen, yes, the snippet that you pasted will be the correct replacement.

Copy link

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.

@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
Development

No branches or pull requests

3 participants