Stratal API Reference
    Preparing search index...

    Class QueueModule

    Index

    Constructors

    Methods

    • Register a queue for injection.

      The queue name serves as both the identifier and the DI injection token. Queue names are typed via module augmentation of QueueNames interface.

      Parameters

      • name: string

        Queue name (typed with autocomplete if QueueNames is augmented)

      Returns DynamicModule

      Dynamic module that provides the queue sender

      // In AppModule imports
      QueueModule.registerQueue('notifications-queue')

      // Then inject using the queue name
      constructor(@InjectQueue('notifications-queue') private queue: IQueueSender) {}