Class PollBackoff

Assembly: redb.Route.GenericFile.dll

Apache Camel ScheduledPollConsumer-style poll backoff: after a threshold number of consecutive
idle or error polls, skip the next multiplier polls, then reset and resume. Pure and timer-free —
the caller drives the loop and applies the delay.

Counters follow Camel: an error poll increments the error count and clears idle; an idle poll increments
idle; a successful poll clears both. When a configured threshold is met the countdown is armed to
multiplier; the countdown is consumed one skip at a time and resets the counters on its last unit.

public sealed class PollBackoff

Inheritance

Object→PollBackoff

Properties

Enabled

True when a multiplier and at least one threshold are configured (otherwise a no-op).

public bool Enabled { get; }

Methods

Classify(PollTally, bool)

Classifies a completed (non-throwing) poll from its tally. No exchange → .

public static PollOutcome Classify(PollTally tally, bool backoffOnFailedExchanges)

Record(PollOutcome)

Records the outcome of an actual poll. Returns a when this outcome just

public BackoffTrigger? Record(PollOutcome outcome)

ShouldSkip()

Called before each cycle. Returns true when this cycle must be skipped (no poll). Consumes one unit

public bool ShouldSkip()

Constructors

PollBackoff(int, int, int)

Creates a backoff with the given multiplier and idle/error thresholds (0 = that part disabled).