package amqp-client-async

  1. Overview
  2. Docs

This method cancels a consumer. This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer. The client may receive an arbitrary number of messages in between sending the cancel method and receiving the cancel-ok reply. It may also be sent from the server to the client in the event of the consumer being unexpectedly cancelled (i.e. cancelled for any reason other than the server receiving the corresponding basic.cancel from the client). This allows clients to be notified of the loss of consumers due to events such as queue deletion. Note that as it is not a MUST for clients to accept this method from the server, it is advisable for the broker to be able to identify those clients that are capable of accepting the method, through some means of capability negotiation.

type t = {
  1. consumer_tag : consumer_tag;
  2. no_wait : no_wait;
}
val init : consumer_tag:consumer_tag -> no_wait:no_wait -> unit -> t
val reply : ?once:bool -> (Framing.t * Framing.channel_no) -> (t -> Cancel_ok.t Thread.Deferred.t) -> unit Thread.Deferred.t
OCaml

Innovation. Community. Security.