Azure / Azure/azure-sdk-for-rust
[Service Bus] Add a retry policy and client retry options
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 109
Description
## Summary
The crate has no retry policy. No operation retries a transient failure, and `ServiceBusClientOptions` exposes no retry knobs.
## Motivation
`ServiceBusRetryOptions` sets the shape: a mode of fixed or exponential, a delay, a maximum delay, a maximum retry count, and a per attempt try timeout. Service Bus does not implement AMQP link recovery, so a client that loses a connection must reconnect, reattach, and retry. Retry is therefore load bearing rather than a convenience.
## Proposal
- Add retry options that mirror `ServiceBusRetryOptions`.
- Drive the policy from the transient flag added in #4938.
- Apply the policy to send, receive, settlement, and every management call.
- Follow `sdk/eventhubs/azure_messaging_eventhubs/src/common/retry.rs`.
## Dependencies
Blocked by:
- #4938 [Service Bus] Replace ServiceBusError with azure_core::Error and a failure reason
Sub-issue of #4934.
Contributor guide
Research direction
First resolve the dependency on issue #4938, then compare the proposed policy with sdk/eventhubs/azure_messaging_eventhubs/src/common/retry.rs and the existing ServiceBusRetryOptions shape. Trace the send, receive, settlement, and management entry points. Done means client retry options drive transient failures across all listed operations, including reconnect and reattach behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100