Skip to main content

Main options

  • retries: number of retries
  • retryDelay: number, function, or based on attempt and last error
  • jitter: randomness to prevent thundering herd
  • backoffStrategy: linear, exponential, fibonacci or function
  • maxDelay: upper limit of delay
  • shouldRetry: decides whether to continue retrying
  • onRetry: observability per attempt

Basic example

Dynamic delay

Retry control with shouldRetry

Observability with onRetry