-
Notifications
You must be signed in to change notification settings - Fork 910
Should KinesisClient have a default RetryPolicy? #1469
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
Comments
Pretty much all configuration objects in the SDK are null by default, so that's the explanation for why this wouldn't work here (or anywhere else in the SDK, really). That said, I can totally see how this behavior would be surprising to a lot of customers. We could theoretically fix this one example, by having the consumer-builder variant of the method instantiate an empty client configuration, pre-populate it using the client defaults (which the client builder happens to know about) and then passing that through. We can't do that everywhere in the client configuration, though. For example, HTTP client configuration defaults are controlled by the SDK core, so every HTTP client builder doesn't have access to the defaults until the HTTP client itself is created. Because we can't support this feature request everywhere, my gut instinct would be to say that we shouldn't do it just for this one use-case. I wouldn't want people to have to learn "it works for X and Y, but not for A or B". Even if the current default behavior is surprising, it's consistent, and once someone learns the pattern they don't have to re-learn it for elsewhere in the SDK. That said, I'm wide open to being convinced otherwise. It's a definite gray-area problem. FYI for people who find this using google, the expected usage would be to do: KinesisClient.builder()
.region(region)
.credentialsProvider(provider)
.overrideConfiguration(config ->
config.retryPolicy(KinesisRetryPolicy.defaultPolicy()
.toBuilder()
.numRetries(5)
.build())
)
.build(); |
…4f621e6c5 Pull request: release <- staging/12a8e9e2-5ca4-42e8-9711-c6c4f621e6c5
There haven't been many upvotes on this issue since it was created, so we might close this issue soon unless there are strong objections. |
Hello all, This feature-request did not have any additional interest/comment since Matthew's last check up. Let us know if this feature-request is still relevant. We appreciate your feedback and contribution to improving the AWS Java SDK V2. Sincerely, Yasmine |
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it. |
Using Java maven dependency software.amazon.awssdk:kinesis:2.3.9 I was surprised that I got a NullPointerException when I tried this:
Expected Behavior
config.retryPolicy() would not be null by default, especially since the only code I see for Kinesis Client in this repo is KinesisRetryPolicy.java.
Current Behavior
config.retryPolicy() is null by default
The text was updated successfully, but these errors were encountered: