package amqp-client-async

  1. Overview
  2. Docs

Module Amqp_client_async.QueueSource

Sourcetype t

Operations on Queues

Sourcetype 'a consumer
Sourceval message_ttl : int -> string * Amqp_client_lib.Types.value
Sourceval auto_expire : int -> string * Amqp_client_lib.Types.value
Sourceval max_length : int -> string * Amqp_client_lib.Types.value
Sourceval max_length_bytes : int -> string * Amqp_client_lib.Types.value
Sourceval dead_letter_exchange : string -> string * Amqp_client_lib.Types.value
Sourceval dead_letter_routing_key : string -> string * Amqp_client_lib.Types.value
Sourceval maximum_priority : int -> string * Amqp_client_lib.Types.value
Sourceval declare : _ Channel.t -> ?durable:bool -> ?exclusive:bool -> ?auto_delete:bool -> ?passive:bool -> ?arguments:Amqp_client_lib.Types.table -> string -> t Thread.Deferred.t

Declare a queue

Sourceval get : no_ack:bool -> _ Channel.t -> t -> Message.t option Thread.Deferred.t

Get a single message from the queue. The function automatically handles ack.

If no_ack is false (default), the message is requsted with expicit ack and the caller is responsible for ack'ing or rejecting the message.

Sourceval publish : 'a Channel.t -> t -> ?mandatory:bool -> Message.message -> 'a Thread.Deferred.t

Publish a message directly to a queue

Sourceval consume : id:string -> ?no_local:bool -> ?no_ack:bool -> ?exclusive:bool -> 'a Channel.t -> t -> ('a consumer * Message.t Thread.Pipe.Reader.t) Thread.Deferred.t

Setup consumption of a queue. Remember to ack messages.

All messages are processed concurrently. To limit number of concurrent processes, set the prefetch threshold.

Sourceval cancel : _ consumer -> unit Thread.Deferred.t

Cancel consumption.

Sourceval bind : _ Channel.t -> t -> 'b Exchange.t -> 'b -> unit Thread.Deferred.t

Bind a queue to an exchange. Messages posted on the exchange which match the routing key (and optionally match the headers) will be routed to the queue

Sourceval unbind : _ Channel.t -> t -> 'b Exchange.t -> 'b -> unit Thread.Deferred.t

Remove a binding from an exchange to a queue

Sourceval purge : _ Channel.t -> t -> unit Thread.Deferred.t

Purge all messages on a queue

Sourceval delete : ?if_unused:bool -> ?if_empty:bool -> _ Channel.t -> t -> unit Thread.Deferred.t

Delete a queue

Sourceval name : t -> string

Name of the queue

OCaml

Innovation. Community. Security.