package amqp-client-async

  1. Overview
  2. Docs

Amqp message type and functions

type message = Spec.Basic.Content.t * string
val string_header : string -> string -> Amqp_client_lib.Types.header
val int_header : string -> int -> Amqp_client_lib.Types.header
type t = {
  1. delivery_tag : int;
  2. redelivered : bool;
  3. exchange : string;
  4. routing_key : string;
  5. message : message;
}
val make : ?content_type:string -> ?content_encoding:string -> ?headers:Amqp_client_lib.Types.table -> ?delivery_mode:int -> ?priority:int -> ?correlation_id:string -> ?reply_to:string -> ?expiration:int -> ?message_id:string -> ?timestamp:int -> ?amqp_type:string -> ?user_id:string -> ?app_id:string -> string -> message
val ack : _ Channel.t -> t -> unit Thread.Deferred.t

Acknowledge a message. Messages must be acknowledged on the same channel as they are received

val reject : requeue:bool -> _ Channel.t -> t -> unit Thread.Deferred.t

Reject (Nack) a message. Messages must be rejected on the same channel as they are received

  • parameter requeue

    If true, the message will be requeued (default)

val recover : requeue:bool -> _ Channel.t -> unit Thread.Deferred.t

Ask the server to resend or discard all outstanding messages on the channel This is essentially the same as calling nack on all outstanding messages.

  • parameter requeue

    if true messages are redelivered

OCaml

Innovation. Community. Security.