Options
All
  • Public
  • Public/Protected
  • All
Menu

AMQP Engine

Hierarchy

  • Engine

Index

Constructors

constructor

  • Parameters

    Returns Engine

Properties

Private #cancelScopes

#cancelScopes: CancelScope[]

Private #channel

#channel: null | Channel

Private #conn

#conn: null | Connection

Private #exchanges

#exchanges: Exchanges

Private #options

#options: EngineOptions

Private #publishers

#publishers: PublisherHandlers

Private #queues

#queues: Queues

Methods

afterDeclare

  • afterDeclare(): Promise<void>
  • Hook called after the AMQP architecture has been declared.

    Returns Promise<void>

beforeConsume

  • beforeConsume(): Promise<void>
  • Hook called before consumers are started.

    Returns Promise<void>

beforeShutdown

  • beforeShutdown(): Promise<void>
  • Hook called before shuting down consumers.

    Returns Promise<void>

consume

  • consume(): Promise<void>
  • Start consumers.

    Will block until all consumers are started then returns.

    Calls Engine.beforeConsume.

    Returns Promise<void>

declare

  • declare(): Promise<void>

getExchange

  • Get the Exchange object by name

    Parameters

    • name: string

    Returns Exchange

getOptions

  • Get a copy of the engine's configuration

    Returns EngineOptions

getPublishers

  • Get a copy of the publisher handlers

    Returns PublisherHandlers

getQueue

  • getQueue(name: string): Queue
  • Get the Queue object by name

    Parameters

    • name: string

    Returns Queue

shutdown

  • shutdown(): Promise<void>
  • Cancel consumers and close channel.

    Will block until all consumers are stoped and the AMQP channel and connection are closed.

    Calls Engine.beforeShutdown.

    Returns Promise<void>

Generated using TypeDoc