package amqp-client-async

  1. Overview
  2. Docs

This method allows a client to reject one or more incoming messages. It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue.

This method is also used by the server to inform publishers on channels in confirm mode of unhandled messages. If a publisher receives this method, it probably needs to republish the offending messages.

type t = {
  1. delivery_tag : delivery_tag;
  2. multiple : Amqp_client_lib.Types.bit;
    (*

    If set to 1, the delivery tag is treated as "up to and including", so that multiple messages can be rejected with a single method. If set to zero, the delivery tag refers to a single message. If the multiple field is 1, and the delivery tag is zero, this indicates rejection of all outstanding messages.

    *)
  3. requeue : Amqp_client_lib.Types.bit;
    (*

    If requeue is true, the server will attempt to requeue the message. If requeue is false or the requeue attempt fails the messages are discarded or dead-lettered. Clients receiving the Nack methods should ignore this flag.

    *)
}
val init : delivery_tag:delivery_tag -> multiple:Amqp_client_lib.Types.bit -> requeue:Amqp_client_lib.Types.bit -> unit -> t
val reply : ?once:bool -> (Framing.t * Framing.channel_no) -> t Async_kernel.Deferred.t
val request : (Framing.t * Framing.channel_no) -> t -> unit Thread.Deferred.t