bunqueue v2.8 API referenceall versions · guide
bunqueue
    Preparing search index...

    Interface ConnectionOptions

    Connection options

    interface ConnectionOptions {
        autoReconnect?: boolean;
        commandTimeout?: number;
        connectTimeout?: number;
        host: string;
        maxCommandTimeouts?: number;
        maxInFlight?: number;
        maxPingFailures?: number;
        maxReconnectAttempts?: number;
        maxReconnectDelay?: number;
        pingInterval?: number;
        pipelining?: boolean;
        port: number;
        reconnectDelay?: number;
        tls?: boolean | ClientTlsOptions;
        token?: string;
    }
    Index
    autoReconnect?: boolean

    Enable auto-reconnect (default: true)

    commandTimeout?: number

    Command timeout in ms (default: 30000)

    connectTimeout?: number

    Connection timeout in ms (default: 5000)

    host: string

    Server host

    maxCommandTimeouts?: number

    Max consecutive command timeouts (with no intervening success) before the connection is concluded dead and reconnect is forced (default: 3, 0 to disable). This is the recovery path for a half-open socket when the health-check ping is disabled or slower than real traffic — a worker whose PULLs keep timing out no longer stalls forever waiting on the ping. See #94.

    maxInFlight?: number

    Max commands in flight when pipelining (default: 100)

    maxPingFailures?: number

    Max consecutive ping failures before forcing reconnect (default: 3)

    maxReconnectAttempts?: number

    Max reconnection attempts (default: Infinity)

    maxReconnectDelay?: number

    Max reconnect delay in ms (default: 30000)

    pingInterval?: number

    Health check ping interval in ms (default: 30000, 0 to disable)

    pipelining?: boolean

    Enable pipelining - multiple commands in flight (default: true)

    port: number

    Server port

    reconnectDelay?: number

    Initial reconnect delay in ms (default: 100)

    tls?: boolean | ClientTlsOptions

    Enable TLS: true (system CAs) or per-connection TLS options (default: false)

    token?: string

    Auth token