package amqp-client-lwt

  1. Overview
  2. Docs

This method creates or checks a queue. When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

type t = {
  1. queue : queue_name;
  2. passive : Amqp_client_lib.Types.bit;
    (*

    If set, the server will reply with Declare-Ok if the queue already exists with the same name, and raise an error if not. The client can use this to check whether a queue exists without modifying the server state. When set, all other method fields except name and no-wait are ignored. A declare with both passive and no-wait has no effect. Arguments are compared for semantic equivalence.

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

    If set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.

    *)
  4. exclusive : Amqp_client_lib.Types.bit;
    (*

    Exclusive queues may only be accessed by the current connection, and are deleted when that connection closes. Passive declaration of an exclusive queue by other connections are not allowed.

    *)
  5. auto_delete : Amqp_client_lib.Types.bit;
    (*

    If set, the queue is deleted when all consumers have finished using it. The last consumer can be cancelled either explicitly or because its channel is closed. If there was no consumer ever on the queue, it won't be deleted. Applications can explicitly delete auto-delete queues using the Delete method as normal.

    *)
  6. no_wait : no_wait;
  7. arguments : Amqp_client_lib.Types.table;
    (*

    A set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation.

    *)
}
val init : queue:'a -> passive:queue_name -> durable:Amqp_client_lib.Types.bit -> exclusive:Amqp_client_lib.Types.bit -> auto_delete:Amqp_client_lib.Types.bit -> no_wait:Amqp_client_lib.Types.bit -> arguments:no_wait -> unit -> Amqp_client_lib.Types.table -> t