Skip to main content

BackoffStrategy

@rotorsoft/act-root


@rotorsoft/act-root / act/src / BackoffStrategy

Type Alias: BackoffStrategy

BackoffStrategy = "fixed" | "linear" | "exponential"

Defined in: libs/act/src/types/action.ts:486

Backoff strategy for delaying the next retry attempt after a handler throws.

  • fixed โ€” wait baseMs between attempts
  • linear โ€” wait baseMs * (retry + 1)
  • exponential โ€” wait baseMs * 2^retry, capped at maxMs if provided

retry is the attempt counter at finalize time, where 0 is the first attempt that just failed. The delay applies before the next attempt.