Skip to content

Ability to create a CallContext with retry settings #7228

@skuruppu

Description

@skuruppu

Is your feature request related to a problem?

In googleapis/java-spanner, we're investigating the possibility of letting users set per-request timeout and retry settings.

Currently, the timeouts and retry settings are set at the time of client creation when the UnaryCallable is created (example). If we want to specify per-request timeouts, you can pass in something like CallContext.withCallOptions(CallOptions.withDeadline()) to the RPC call. But there is no equivalent option for retry settings.

Describe the solution you'd like

If CallContext or CallOptions includes a withRetrySettings() method, then this can be accomplished.

Describe alternatives you've considered

The only solution we have right now is to ask the customer to create multiple clients where each client has different retry settings set. But this doesn't resolve all use cases because some customers have requested the ability to programatically change the retry setting in their applications. Instantiating and managing multiple clients can be tedious.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions