Amqp_client_async.Channel
Operations on channels
val no_confirm : no_confirm confirms
val with_confirm : with_confirm confirms
val create :
id:string ->
'a confirms ->
Framing.t ->
Framing.channel_no ->
'a t Thread.Deferred.t
Create a new channel. Use Connection.open_channel rather than this method directly
val close : _ t -> unit Thread.Deferred.t
Close the channel
val on_closed : _ t -> unit Thread.Deferred.t
on_closed
becomes determined after then channel is closed.
If there are no consumers of this when the channel is close Connection_closed
will be raised to the governing exception handler (the parent monitor in async, or Lwt.async_exception_hook
in lwt).
val on_return :
_ t ->
(Spec.Basic.Return.t * (Spec.Basic.Content.t * string)) Thread.Pipe.Reader.t
Receive all returned messages. Reutnred message will be send to all readers returned from call to this function. Listening for returned messages are useful in e.g. rpc to know that message delivery failed and then stop waiting for a response.
Note that channels in ack mode there is no need to listen for returned messages, as message delivery will fail synchoniously.
val id : _ t -> string
Get the id of the channel
val channel_no : _ t -> int
Get the channel_no of the connection
val set_prefetch : ?count:int -> ?size:int -> _ t -> unit Thread.Deferred.t
Set prefetch counters for a channel.
val set_global_prefetch :
?count:int ->
?size:int ->
_ t ->
unit Thread.Deferred.t
Set global prefetch counters.
val flush : _ t -> unit Thread.Deferred.t
Flush the channel, making sure all messages have been sent
module Transaction : sig ... end
Transactions. Transactions can be made per channel.