Module Amqp_client_async.Exchange

Operations on exchanges

type _ t
type _ exchange_type
val direct_t : [ `Queue of string ] exchange_type
val fanout_t : unit exchange_type
val topic_t : [ `Topic of string ] exchange_type
val match_t : [ `Headers of Amqp_client_lib.Types.header list ] exchange_type
val default : [ `Queue of string ] t
val amq_direct : [ `Queue of string ] t
val amq_fanout : unit t
val amq_topic : [ `Topic of string ] t
val amq_match : [ `Headers of Amqp_client_lib.Types.header list ] t
val declare : ?passive:bool -> ?durable:bool -> ?auto_delete:bool -> ?internal:bool -> _ Channel.t -> 'a exchange_type -> ?arguments:Amqp_client_lib.Types.table -> string -> 'a t Thread.Deferred.t

Declare a exchange

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

Delete exchange

val bind : _ Channel.t -> destination:_ t -> source:'a t -> 'a -> unit Thread.Deferred.t

Bind exchange t to exchange using routing_key, so messages are routed from exchange to t

val unbind : _ Channel.t -> destination:_ t -> source:'a t -> 'a -> unit Thread.Deferred.t

Remove exchange to exchange binding

val publish : 'a Channel.t -> _ t -> ?mandatory:bool -> routing_key:string -> Message.message -> 'a Thread.Deferred.t

Publish a message directly to an exchange.

val name : _ t -> string

Name of the exchange