A consumer, subscribed to a queue

Constructors

Properties

Methods

Constructors

Properties

channel: AMQPChannel
onMessage: (msg: AMQPMessage) => void
tag: string

Methods

  • Cancel/abort/stop the consumer. No more messages will be deliviered to the consumer. Note that any unacked messages are still unacked as they belong to the channel and not the consumer.

    Returns Promise<AMQPChannel>

  • Wait for the consumer to finish.

    Parameters

    • Optionaltimeout: number

      wait for this many milliseconds and then return regardless

    Returns Promise<void>

    Fulfilled when the consumer/channel/connection is closed by the client. Rejected if the timeout is hit.