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

    Type Alias QueueSubscribeParams

    QueueSubscribeParams: ConsumeParams & {
        manualAck?: boolean;
        prefetch?: number;
        requeueOnNack?: boolean;
    }

    Options for AMQPQueue#subscribe. Combines consumer parameters with channel-level prefetch.

    Type declaration

    • OptionalmanualAck?: boolean

      Take over acknowledgement. The library keeps the broker tracking delivery tags (wire-level noAck: false, so unacked messages are redelivered after a disconnect) but does not ack or nack for you — call msg.ack() / msg.nack() yourself, on whatever schedule you like (after a timer, a downstream write, a batch). Pair with prefetch to bound how many deliveries can be in flight unacked.

      Note: a delivery tag is only valid on the channel it arrived on. If the connection drops before you ack, the tag is dead — the broker requeues and redelivers the message, so msg.ack() from a stale timer will reject. Treat an ack failure as "it'll be redelivered", not message loss.

      Mutually distinct from noAck: true (fire-and-forget, no redelivery) and from the default auto-ack-on-callback-return.

    • Optionalprefetch?: number

      Per-consumer prefetch limit (sets QoS on the channel before consuming).

    • OptionalrequeueOnNack?: boolean

      Whether to requeue messages that are nacked due to a callback error. Defaults to true. Ignored when manualAck is set.