Skip to content

feat: built-in retry policies (exponential backoff, exception-type filtering) #4890

@thomhurst

Description

@thomhurst

Description

RetryAttribute allows custom ShouldRetry logic, but there are no built-in patterns for common retry scenarios.

Missing Patterns

  • Exponential backoff with jitter
  • Retry only on specific exception types (transient failures)
  • Timeout-specific retry policy
  • Combined/composed retry policies

Proposed Approach

  • Create IRetryPolicy interface with built-in implementations
  • Add attributes like [ExponentialBackoffRetry(3, initialDelayMs: 100, multiplier: 2.0)]
  • Create RetryContext with attempt number, delay, and exception info
  • Add metrics for retry success/failure rates

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions