@grow-codes/graylog - v0.1.1
    Preparing search index...

    Interface BatchOptions

    Options of BatchProcessor (SPEC §4).

    interface BatchOptions {
        dropPolicy?: DropPolicy;
        exportTimeoutMs?: number;
        flushIntervalMs?: number;
        gzip?: boolean;
        maxBatchBytes?: number;
        maxBatchSize?: number;
        maxExportRetries?: number;
        maxQueueSize?: number;
        onDrop?: (records: LogRecord[], reason: DropReason) => void;
        onError?: (error: unknown, records: LogRecord[]) => void;
        retryBackoffMs?: number;
    }
    Index
    dropPolicy?: DropPolicy

    drop_newest (default) rejects new records while the queue is full, drop_oldest evicts the oldest queued record, block never drops for a full queue: the queue may grow past maxQueueSize, an export starts at once, and BatchProcessor.addAsync waits for capacity (JavaScript cannot block a synchronous call).

    exportTimeoutMs?: number

    Deadline of one export call; also the default timeout of flush/shutdown. Default 30000 ms.

    flushIntervalMs?: number

    Interval of the background export. Default 1000 ms.

    gzip?: boolean

    Ask the exporter to gzip the payload. Default true.

    maxBatchBytes?: number

    UTF-8 JSON bytes per export call (a batch always holds at least one record). Default 1 MiB.

    maxBatchSize?: number

    Records per export call. Default 512.

    maxExportRetries?: number

    Export attempts repeated after a retryable failure (error.retryable). Default 2.

    maxQueueSize?: number

    Records kept in memory before the drop policy applies. Default 2048.

    onDrop?: (records: LogRecord[], reason: DropReason) => void

    Called with records that will never be exported. Exceptions are ignored.

    onError?: (error: unknown, records: LogRecord[]) => void

    Called when an export fails or the service rejects records. Exceptions are ignored.

    retryBackoffMs?: number

    Base delay before a repeated export, doubled per attempt. Default 200 ms.