Backoff

object Backoff

Deterministic exponential backoff for events.

We keep it simple and predictable for enterprise debugging. The delay starts at 10 seconds and doubles per attempt until the tenth doubling, then stays at CEILING_MS (10,240,000 ms, about 2.8 hours).

Properties

Link copied to clipboard
const val CEILING_MS: Long

The longest delay nextDelayMs returns: BASE_S doubled MAX_SHIFT times, in milliseconds.

Functions

Link copied to clipboard
fun nextDelayMs(attemptsSoFar: Int): Long