ExponentialBackoff
data class ExponentialBackoff(val maxAttempts: Int = 5, val initialDelay: Duration = 2.seconds, val maxDelay: Duration = 60.seconds, val multiplier: Double = 2.0, val jitterFactor: Double = 0.2) : RetryPolicy(source)
Retry with exponential backoff and optional jitter.
Delay formula: min(initialDelay * multiplier^attempt, maxDelay) ± jitter
Constructors
Properties
Link copied to clipboard
delay before first retry
Link copied to clipboard
random jitter factor (0.0 = no jitter, 0.2 = ±20%)
Link copied to clipboard
maximum number of retry attempts
Link copied to clipboard
Maximum number of attempts for this policy.
Link copied to clipboard
backoff multiplier per attempt