bullmq - v6.0.3
    Preparing search index...

    Class QueueBase<B>

    Base class for all classes that need to interact with queues. This class is normally not used directly, but extended by the other classes.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index
    backend: B

    The datastore backend the queue operates through.

    closing: Promise<void>
    keys: KeysMap
    name: string

    The name of the queue.

    opts: QueueBaseOptions = ...

    Options for the queue.

    qualifiedName: string
    toKey: (type: string) => string
    • Closes the connection and returns a promise that resolves when the connection is closed.

      Returns Promise<void>

    • Emits an event. Normally used by subclasses to emit events.

      Parameters

      • event: string | symbol

        The emitted event.

      • ...args: any[]

        The arguments to pass to the event listeners.

      Returns boolean

      True if the event had listeners, false otherwise.

    • Returns the datastore backend that powers this instance.

      The backend owns its connection(s) and exposes every datastore-agnostic operation through IQueueBackend. Datastore-specific escape hatches (e.g. the raw Redis client) live on the concrete backend implementation, and are exposed here when the class is parameterized on that concrete backend type (the default for the built-in, Redis-backed classes).

      Returns B

    • Wraps the code with telemetry and provides a span for configuration.

      Type Parameters

      • T

      Parameters

      • spanKind: SpanKind

        kind of the span: Producer, Consumer, Internal

      • operation: string

        operation name (such as add, process, etc)

      • destination: string

        destination name (normally the queue name)

      • callback: (span?: Span, dstPropagationMetadata?: string) => T | Promise<T>

        code to wrap with telemetry

      • OptionalsrcPropagationMetadata: string

        The source propagation metadata for telemetry context.

      Returns Promise<T | Promise<T>>

      The result of the callback function.