@cloudamqp/amqp-client
    Preparing search index...

    Class AMQPGeneratorConsumer

    A consumer, subscribed to a queue

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    channel: AMQPChannel
    closed: boolean = false
    closedError?: Error
    onMessage: (msg: AMQPMessage) => void | Promise<void>
    tag: string

    Accessors

    • get messages(): AsyncGenerator<AMQPMessage, void, undefined>

      Get an AsyncGenerator for consuming messages.

      Returns AsyncGenerator<AMQPMessage, void, undefined>

      An AsyncGenerator that yields messages

    Methods

    • 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.