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

Configuring AWS SDK Retry Policies via application.properties #1501

Open
Shanzeee opened this issue Nov 22, 2024 · 4 comments
Open

Configuring AWS SDK Retry Policies via application.properties #1501

Shanzeee opened this issue Nov 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Shanzeee
Copy link

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:

DynamoDbAsyncClient.builder()
    .overrideConfiguration(
        ClientOverrideConfiguration.builder()
            .retryPolicy(RetryMode.STANDARD)
            .build()
    )
    .build()

This approach works but feels inconsistent with Quarkus's configuration-driven approach.

Questions:

  • Is there an easier way to configure retry policies that I might have missed?
  • Are there plans to support properties like this in the future?

Thanks in advance for your help!

@scrocquesel
Copy link
Member

scrocquesel commented Nov 22, 2024

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

@scrocquesel scrocquesel added the enhancement New feature or request label Nov 22, 2024
@Shanzeee Shanzeee closed this as completed Dec 3, 2024
@scrocquesel
Copy link
Member

@Shanzeee Why did you close the issue ?

@Shanzeee
Copy link
Author

Hi @scrocquesel,

I’m really sorry for accidentally closing the issue earlier – it was unintentional.
I’ve tried the proposed solution (quarkus.dynamodb.advanced.retry-strategy.retry-mode=STANDARD), but it doesn’t seem to have any effect.

WARN  [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.dynamodb.advanced.retry-strategy.retry-mode" was provided; it will be ignored;

I can provide a minimal reproducer project

Thank you for your patience, and apologies again for the confusion!

Quarkus version: 3.17.4

@Shanzeee Shanzeee reopened this Dec 17, 2024
@scrocquesel
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants