package amqp-client-async

  1. Overview
  2. Docs

This method binds a queue to an exchange. Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

type t = {
  1. queue : queue_name;
    (*

    Specifies the name of the queue to bind.

    *)
  2. exchange : exchange_name;
  3. routing_key : Amqp_client_lib.Types.shortstr;
    (*

    Specifies the routing key for the binding. The routing key is used for routing messages depending on the exchange configuration. Not all exchanges use a routing key - refer to the specific exchange documentation. If the queue name is empty, the server uses the last queue declared on the channel. If the routing key is also empty, the server uses this queue name for the routing key as well. If the queue name is provided but the routing key is empty, the server does the binding with that empty routing key. The meaning of empty routing keys depends on the exchange implementation.

    *)
  4. no_wait : no_wait;
  5. arguments : Amqp_client_lib.Types.table;
    (*

    A set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.

    *)
}
val init : queue:'a -> exchange:queue_name -> routing_key:exchange_name -> no_wait:Amqp_client_lib.Types.shortstr -> arguments:no_wait -> unit -> Amqp_client_lib.Types.table -> t
val request : (Framing.t * Framing.channel_no) -> t -> unit Thread.Deferred.t