bullmq - v5.56.2
    Preparing search index...

    Class QueueEventsProducer

    The QueueEventsProducer class is used for publishing custom events.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

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

    The name of the queue.

    opts: QueueBaseOptions = ...

    Options for the queue.

    qualifiedName: string
    toKey: (type: string) => string

    Accessors

    • get redisVersion(): string

      Returns the version of the Redis instance the client is connected to,

      Returns string

    Methods

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

      Parameters

      • event: string | symbol

        The emitted event.

      • ...args: any[]

      Returns boolean

    • Publish custom event to be processed in QueueEvents.

      Type Parameters

      • T extends { eventName: string }

      Parameters

      • argsObj: T

        Event payload

      • maxEvents: number = 1000

        Max quantity of events to be saved

      Returns Promise<void>

    • 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

      Returns Promise<T | Promise<T>>