Merge pull request #25 from rabbitmq/echo-flow-state
Add function to request flow state from sender
This commit is contained in:
commit
ed054e2e2f
|
|
@ -47,6 +47,7 @@
|
|||
accept_msg/2,
|
||||
flow_link_credit/3,
|
||||
flow_link_credit/4,
|
||||
echo/1,
|
||||
link_handle/1,
|
||||
get_msg/1,
|
||||
get_msg/2,
|
||||
|
|
@ -299,6 +300,15 @@ flow_link_credit(#link_ref{role = receiver, session = Session,
|
|||
drain = Drain},
|
||||
ok = amqp10_client_session:flow(Session, Handle, Flow, RenewWhenBelow).
|
||||
|
||||
%% @doc Request that the sender's flow state is echoed back
|
||||
%% This may be used to determine when the Link has finally quiesced.
|
||||
%% see §2.6.10 of the spec
|
||||
echo(#link_ref{role = receiver, session = Session,
|
||||
link_handle = Handle}) ->
|
||||
Flow = #'v1_0.flow'{link_credit = {uint, 0},
|
||||
echo = true},
|
||||
ok = amqp10_client_session:flow(Session, Handle, Flow, 0).
|
||||
|
||||
%%% messages
|
||||
|
||||
%% @doc Send a message on a the link referred to be the 'LinkRef'.
|
||||
|
|
|
|||
Loading…
Reference in New Issue