bullmq - v6.0.3
    Preparing search index...

    Type Alias BackendFactory<B>

    BackendFactory: (
        name: string,
        opts: QueueBaseOptions,
        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).

    The factory is generic over the concrete backend type B it produces, so a caller (or class) parameterized on B keeps the concrete typing end-to-end (e.g. getBackend() returning the concrete adapter instead of the bare interface).

    Type Parameters

    Type Declaration

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

        • name: string
        • opts: QueueBaseOptions
        • 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