RetryPolicy

fun interface RetryPolicy

Decides the delay before the next attempt, or null to give up (dead-letter).

attempt is the 1-based number of the attempt that just failed: after the first failure the policy is called with attempt = 1.

Deserialization failures never reach a retry policy: a payload that cannot be decoded is dead-lettered immediately, because retrying it is pure waste.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun nextDelay(attempt: Int, error: Throwable): Duration?