package amqp-client-async

  1. Overview
  2. Docs

This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

type t = {
  1. exchange : exchange_name;
  2. amqp_type : Amqp_client_lib.Types.shortstr;
    (*

    Each exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.

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

    If set, the server will reply with Declare-Ok if the exchange already exists with the same name, and raise an error if not. The client can use this to check whether an exchange 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.

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

    If set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.

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

    If set, the exchange is deleted when all queues have finished using it.

    *)
  6. internal : Amqp_client_lib.Types.bit;
    (*

    If set, the exchange may not be used directly by publishers, but only when bound to other exchanges. Internal exchanges are used to construct wiring that is not visible to applications.

    *)
  7. no_wait : no_wait;
  8. 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 : exchange:'a -> amqp_type:exchange_name -> passive:Amqp_client_lib.Types.shortstr -> durable:Amqp_client_lib.Types.bit -> auto_delete:Amqp_client_lib.Types.bit -> internal:Amqp_client_lib.Types.bit -> no_wait:Amqp_client_lib.Types.bit -> arguments:no_wait -> unit -> Amqp_client_lib.Types.table -> t
val request : (Framing.t * Framing.channel_no) -> t -> unit Thread.Deferred.t
OCaml

Innovation. Community. Security.