-
Notifications
You must be signed in to change notification settings - Fork 52
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
Configuring AWS SDK Retry Policies via application.properties #1501
Comments
Hi, Does something very simple like this would be enough. quarkus.dynamodb.advanced.retry-strategy.retry-mode=STANDARD # one of RetryMode enum
quarkus.dynamodb.advanced.retry-strategy.max-attempts=3 |
@Shanzeee Why did you close the issue ? |
Hi @scrocquesel, I’m really sorry for accidentally closing the issue earlier – it was unintentional.
I can provide a minimal reproducer project Thank you for your patience, and apologies again for the confusion! Quarkus version: 3.17.4 |
It is a proposal. It is only a pull request for now. I was challenging the requirement as configuring the retry strategy by code allow a lot more possibility and I'm not sure it is really needed. When the base config is not enough, I guess users can still do what you mentioned |
Hi @scrocquesel, After further investigation, I realized that my current approach: class DynamoDbClientConfig {
@ApplicationScoped
fun dynamoDbAsyncClient(): DynamoDbAsyncClient {
return DynamoDbAsyncClient.builder()
.overrideConfiguration(
ClientOverrideConfiguration.builder()
.retryStrategy(STANDARD)
.build()
)
.build()
}
@ApplicationScoped
fun dynamoDbEnhancedAsyncClient(): DynamoDbEnhancedAsyncClient {
return DynamoDbEnhancedAsyncClient.builder()
.dynamoDbClient(dynamoDbAsyncClient())
.build()
}
} does not work as expected. Instead of modifying the Quarkus-managed DynamoDbAsyncClient, it creates a completely new instance. This leads to inconsistencies, especially when using other Quarkus-provided integrations like quarkus.dynamodbenhanced.client-extensions. Could you confirm if there’s a way to modify the existing Quarkus-managed DynamoDbAsyncClient rather than creating a new one? If not, would it make sense to extend the configuration options to support retry policies natively? Thanks again for your help! |
Hi everyone,
I’ve been working on configuring the retry behavior for AWS SDK clients in Quarkus applications, and I noticed there’s no built-in way to define retry policies (e.g., RetryMode or maximum retries) via the application.properties file.
Currently, configuring AWS SDK retry policies requires manually creating a custom bean with
ClientOverrideConfiguration
.Example for
DynamoDbAsyncClient
:This approach works but feels inconsistent with Quarkus's configuration-driven approach.
Questions:
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: