QuestDB JavaScript Client - v5.0.0
    Preparing search index...

    Interface QwpNodeFileReplayStoreOptions

    interface QwpNodeFileReplayStoreOptions {
        appendDeadlineMs?: number;
        backpressurePolicy?: QwpSfBackpressurePolicy;
        checkpointIntervalMs?: number;
        directory: string;
        durability?: QwpSfDurability;
        maxBytes?: number;
        maxSegmentBytes?: number;
        onRecoveryDataLoss?: (report: QwpNodeReplayDataLossReport) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    appendDeadlineMs?: number

    Per-append capacity or retryable store-fault deadline. Defaults to 30 seconds.

    backpressurePolicy?: QwpSfBackpressurePolicy

    Behavior when maxBytes is exhausted. error fails immediately; wait pauses the append until ACK trimming frees space or its deadline expires. Defaults to error for backwards compatibility.

    This decides journal exhaustion only. A transient retryable fault parks until appendDeadlineMs under either policy, so the only errors an append surfaces are exhaustion and that deadline.

    checkpointIntervalMs?: number

    Periodic durability checkpoint cadence. Defaults to 5 seconds.

    directory: string

    Exclusive directory used by one ingress session.

    durability?: QwpSfDurability

    Local persistence barrier. append preserves the existing fsync-per-frame behavior, periodic checkpoints dirty files in the background, and memory relies on OS page-cache writeback. Defaults to append.

    maxBytes?: number

    Target maximum journal size including fixed segment reservations and symbol metadata. Defaults to 1 GiB. The current symbol dictionary may exceed this target so it cannot consume the journal's live frame budget before a drained close retires that dictionary generation.

    A commit whose deferred prefix already fills the journal also overshoots it, because QuestDB withholds that prefix's ACK until the commit arrives, so no amount of trimming could make room first. For fixed segment size S, reservations are capped at S * (floor(maxBytes / S) + max(floor(maxBytes / S), ceil(min(maxBytes, 32 MiB) / S))), saturated at Number.MAX_SAFE_INTEGER. The closing batch must fit the applicable standalone rounded segment allowance on its own. The retained dictionary is additive; beyond the cap appends backpressure. When S divides maxBytes exactly, this segment cap is 2 * maxBytes.

    Must reserve at least one whole segment -- maxSegmentBytes + 32 for the 24-byte SFA header and the 8-byte frame header. A smaller target throws a RangeError, because no append could ever reserve its first segment and no acknowledgement could ever free room for one.

    maxSegmentBytes?: number

    Maximum QWP frame payload and target segment data size. Each fixed segment reserves this value plus one record header and its 24-byte SFA header, so a maximum-sized frame still fits. Defaults to 4 MiB. With a directory, QwpNodeFileReplayStoreOptions.maxBytes must leave room for one whole segment of this size plus those 32 bytes of headers.

    onRecoveryDataLoss?: (report: QwpNodeReplayDataLossReport) => void

    Reports journal bytes abandoned during recovery. Defaults to logging at error level; recovery still succeeds, so this must never be silent.