Skip to content

Type Alias: Backoff ​

Backoff = Duration | { delay: Duration; max?: Duration; type: "fixed" | "exponential"; }

The wait before a message is delivered again after its processing failed: a fixed duration, or a policy ('exponential' doubles the delay after each failed attempt, up to max).

Union Members ​

Duration


Type Literal ​

{ delay: Duration; max?: Duration; type: "fixed" | "exponential"; }

delay ​

delay: Duration

The delay after the first failed attempt.

max? ​

optional max?: Duration

The longest delay (exponential).

Default ​
ts
no limit

type ​

type: "fixed" | "exponential"

'fixed': the same delay after each failed attempt; 'exponential': the delay doubled after each one.

Released under the MIT License.