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

    Class AMQPSubscription

    A persistent queue subscription returned by AMQPSession.subscribe.

    Remains valid across reconnections — the underlying channel and consumer tag are swapped in-place after each reconnect. Use cancel() to unsubscribe and remove from auto-recovery.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    consumer: AMQPConsumer
    def: ConsumerDefinition
    onCancel?: () => void

    Accessors

    • get consumerTag(): string

      The consumer tag. Reflects the most recent tag after a reconnect.

      Returns string

    Methods

    • Cancel the subscription and remove it from session auto-recovery. Safe to call on a closed channel.

      Returns Promise<void>