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/reaction.ts:173

Backoff strategy for delaying the next retry attempt after a reaction 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 lease's retry counter at finalize time, where 0 is the first attempt that just failed. So the delay applies before the next attempt.