Contentful Personalization & Analytics
    Preparing search index...

    Policy options for controlling queue flush retry behavior.

    interface QueueFlushPolicy {
        baseBackoffMs?: number;
        circuitOpenMs?: number;
        flushIntervalMs?: number;
        jitterRatio?: number;
        maxBackoffMs?: number;
        maxConsecutiveFailures?: number;
        onCircuitOpen?: (context: QueueFlushFailureContext) => void;
        onFlushFailure?: (context: QueueFlushFailureContext) => void;
        onFlushRecovered?: (context: QueueFlushRecoveredContext) => void;
    }
    Index

    Properties

    baseBackoffMs?: number

    Base retry backoff delay in milliseconds.

    500

    circuitOpenMs?: number

    Duration in milliseconds to wait before retrying after circuit opens.

    120000

    flushIntervalMs?: number

    Periodic flush interval in milliseconds while events remain queued.

    30000

    jitterRatio?: number

    Jitter ratio applied to retry delay to avoid synchronized retries.

    Value is clamped to [0, 1].

    0.2

    maxBackoffMs?: number

    Maximum retry backoff delay in milliseconds.

    30000

    maxConsecutiveFailures?: number

    Consecutive failures threshold before opening the circuit window.

    8

    onCircuitOpen?: (context: QueueFlushFailureContext) => void

    Callback invoked when the circuit opens after consecutive failures.

    onFlushFailure?: (context: QueueFlushFailureContext) => void

    Callback invoked after each failed flush attempt.

    onFlushRecovered?: (context: QueueFlushRecoveredContext) => void

    Callback invoked when a flush succeeds after previous failures.