aws / aws/aws-sdk-java-v2

A way to add to the default retry policy of a client

Open
#1,755 5 comments 0 reactions 0 assignees View on GitHub
feature-request p3
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

## Describe the Feature

Sometimes I logically want to add a retry condition to a certain client, without changing the rest of its default retry policy, especially if it already uses a custom one like DynamoDB.

## Is your Feature Request related to a problem?

I don't seem to have a way to get at [this `DynamoDbRetryPolicy` class](https://github.com/aws/aws-sdk-java-v2/blob/master/services/dynamodb/src/main/java/software/amazon/awssdk/services/dynamodb/DynamoDbRetryPolicy.java#L32-L33), for example, because it's marked as an internal API. Furthermore, I need to look at the SDK source code to even see which retry policy I should be aiming to modify or copy.

## Proposed Solution

Not sure, maybe provide some sort of builder method that gives me access to the default value I'd be overriding?

## Describe alternatives you've considered

Reflection to get at the internal class, but then it can break from commits [like this](https://github.com/aws/aws-sdk-java-v2/commit/8336dc22780e504f2136dbc273234fa72a915318).

## Additional Context

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.