bullmq - v6.3.11
    Preparing search index...

    Type Alias BackendFactory<B, ConnectionOptionsType>

    BackendFactory: (
        name: string,
        opts: QueueBaseOptions<ConnectionOptionsType>,
        options?: { blocking?: boolean; withBlockingConnection?: boolean },
    ) => B

    Factory that builds an IQueueBackend for a given queue. Injected into the queue classes so they depend only on the abstraction, never on a concrete datastore/connection. The default factory is the Redis one (createRedisBackend).

    Constructors infer the backend and connection types from this factory. Use withBackend when also specifying job or event-result type arguments. Without a factory or explicit types, constructors retain their Redis defaults.

    Type Parameters

    Type Declaration

      • (
            name: string,
            opts: QueueBaseOptions<ConnectionOptionsType>,
            options?: { blocking?: boolean; withBlockingConnection?: boolean },
        ): B
      • Parameters

        • name: string
        • opts: QueueBaseOptions<ConnectionOptionsType>
        • Optionaloptions: { blocking?: boolean; withBlockingConnection?: boolean }
          • Optionalblocking?: boolean

            The backend's main connection is itself blocking (e.g. QueueEvents).

          • OptionalwithBlockingConnection?: boolean

            Provision a dedicated blocking connection (workers).

        Returns B