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

    Class AMQPQueue

    High-level queue handle returned by AMQPSession#queue.

    All operations are reconnect-safe: they acquire a session channel on each call, so they work transparently after a reconnection. subscribe provides automatic consumer recovery. publish waits for a broker confirm; use Pass { confirm: false } to skip the wait.

    Index

    Properties

    name: string

    Methods

    • Bind this queue to an exchange.

      Parameters

      • exchange: string
      • routingKey: string = ""
      • args: Record<string, unknown> = {}

      Returns Promise<AMQPQueue>

      this for chaining

    • Delete this queue.

      Parameters

      • Optionalparams: { ifEmpty?: boolean; ifUnused?: boolean }
        • OptionalifEmpty?: boolean

          only delete if the queue is empty

        • OptionalifUnused?: boolean

          only delete if the queue has no consumers

      Returns Promise<MessageCount>

    • Poll the queue for a single message.

      Parameters

      • Optionalparams: { noAck?: boolean }
        • OptionalnoAck?: boolean

          automatically acknowledge on delivery

      Returns Promise<null | AMQPMessage>

    • Remove a binding between this queue and an exchange.

      Parameters

      • exchange: string
      • routingKey: string = ""
      • args: Record<string, unknown> = {}

      Returns Promise<AMQPQueue>

      this for chaining