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

    Interface BunqueueConfig

    Global bunqueue configuration (all sections optional)

    interface BunqueueConfig {
        auth?: { requireAuthForMetrics?: boolean; tokens?: string[] };
        backup?: {
            accessKeyId?: string;
            bucket?: string;
            enabled?: boolean;
            endpoint?: string;
            interval?: number;
            prefix?: string;
            region?: string;
            retention?: number;
            secretAccessKey?: string;
            sessionToken?: string;
            virtualHostedStyle?: boolean;
        };
        cloud?: { apiKey?: string; instanceId?: string; url?: string };
        cors?: { origins?: string[] };
        logging?: {
            format?: "text" | "json";
            level?: "info" | "warn" | "error" | "debug";
        };
        server?: {
            host?: string;
            httpPort?: number;
            httpSocketPath?: string;
            tcpPort?: number;
            tcpSocketPath?: string;
            tlsCertFile?: string;
            tlsKeyFile?: string;
        };
        storage?: {
            brokerId?: string;
            completedRetentionMs?: number
            | null;
            dataPath?: string;
            driver?: "memory" | "sqlite" | "postgres";
            idleTransactionTimeoutMs?: number;
            leaseDurationMs?: number;
            lockTimeoutMs?: number;
            maxCompletedJobs?: number;
            maxConcurrentOperations?: number;
            maxQueuedOperations?: number;
            maxSnapshotJobs?: number;
            maxSnapshotPayloadBytes?: number;
            namespace?: string;
            pollIntervalMs?: number;
            poolSize?: number;
            statementTimeoutMs?: number;
            url?: string;
        };
        telemetry?: { maxPrometheusQueues?: number };
        timeouts?: {
            lock?: number;
            shutdown?: number;
            stats?: number;
            worker?: number;
        };
        webhooks?: { maxRetries?: number; retryDelay?: number };
    }
    Index
    auth?: { requireAuthForMetrics?: boolean; tokens?: string[] }
    backup?: {
        accessKeyId?: string;
        bucket?: string;
        enabled?: boolean;
        endpoint?: string;
        interval?: number;
        prefix?: string;
        region?: string;
        retention?: number;
        secretAccessKey?: string;
        sessionToken?: string;
        virtualHostedStyle?: boolean;
    }
    cloud?: { apiKey?: string; instanceId?: string; url?: string }
    cors?: { origins?: string[] }
    logging?: {
        format?: "text" | "json";
        level?: "info" | "warn" | "error" | "debug";
    }
    server?: {
        host?: string;
        httpPort?: number;
        httpSocketPath?: string;
        tcpPort?: number;
        tcpSocketPath?: string;
        tlsCertFile?: string;
        tlsKeyFile?: string;
    }

    Type Declaration

    • Optionalhost?: string
    • OptionalhttpPort?: number
    • OptionalhttpSocketPath?: string
    • OptionaltcpPort?: number
    • OptionaltcpSocketPath?: string
    • OptionaltlsCertFile?: string

      Path to PEM certificate file — enables native TLS on TCP + HTTP (with tlsKeyFile)

    • OptionaltlsKeyFile?: string

      Path to PEM private key file — enables native TLS on TCP + HTTP (with tlsCertFile)

    storage?: {
        brokerId?: string;
        completedRetentionMs?: number | null;
        dataPath?: string;
        driver?: "memory" | "sqlite" | "postgres";
        idleTransactionTimeoutMs?: number;
        leaseDurationMs?: number;
        lockTimeoutMs?: number;
        maxCompletedJobs?: number;
        maxConcurrentOperations?: number;
        maxQueuedOperations?: number;
        maxSnapshotJobs?: number;
        maxSnapshotPayloadBytes?: number;
        namespace?: string;
        pollIntervalMs?: number;
        poolSize?: number;
        statementTimeoutMs?: number;
        url?: string;
    }

    Type Declaration

    • OptionalbrokerId?: string

      Stable identifier for this broker process; generated automatically when omitted.

    • OptionalcompletedRetentionMs?: number | null

      Automatic age-based completed-job retention in milliseconds; null disables it.

    • OptionaldataPath?: string
    • Optionaldriver?: "memory" | "sqlite" | "postgres"

      Persistence backend. Inferred from url/dataPath when omitted.

    • OptionalidleTransactionTimeoutMs?: number
    • OptionalleaseDurationMs?: number
    • OptionallockTimeoutMs?: number
    • OptionalmaxCompletedJobs?: number

      Hot in-memory completed-job window; this is not durable retention.

    • OptionalmaxConcurrentOperations?: number
    • OptionalmaxQueuedOperations?: number
    • OptionalmaxSnapshotJobs?: number
    • OptionalmaxSnapshotPayloadBytes?: number
    • Optionalnamespace?: string

      Isolates independent bunqueue installations sharing one PostgreSQL database.

    • OptionalpollIntervalMs?: number
    • OptionalpoolSize?: number
    • OptionalstatementTimeoutMs?: number
    • Optionalurl?: string

      PostgreSQL connection URL. Required when driver is postgres.

    telemetry?: { maxPrometheusQueues?: number }

    Type Declaration

    • OptionalmaxPrometheusQueues?: number

      Maximum queue label values exposed to Prometheus; zero disables per-queue series.

    timeouts?: { lock?: number; shutdown?: number; stats?: number; worker?: number }
    webhooks?: { maxRetries?: number; retryDelay?: number }