Fixed

data class Fixed(val maxAttempts: Int = 3, val delay: Duration = 5.seconds) : RetryPolicy(source)

Retry with fixed delay between attempts.

Constructors

Link copied to clipboard
constructor(maxAttempts: Int = 3, delay: Duration = 5.seconds)

Properties

Link copied to clipboard

fixed delay between retries

Link copied to clipboard

maximum number of retry attempts (not counting the initial send)

Link copied to clipboard

Maximum number of attempts for this policy.

Functions

Link copied to clipboard
fun delayForAttempt(attempt: Int): Duration?

Computes the delay before the Nth retry attempt (0-indexed). Returns null if the attempt exceeds maxAttempts.