Hi,

AMQP 1.0 defines a way to force a sending link to exhaust its credit via a 
drain flag in the Flow frame (see the flow control section in the spec).

Hate to admit my ignorance, but how does one properly drain a link using the 
Proton engine api?

>From what I can tell (using the proton-c api here), the application initiates 
>the drain by calling pn_link_drain() for a given link:

  pn_link_drain( myLink, X )

How does the application know when the drain has completed?  My guess is that 
the drain can be considered complete when the pn_link_credit() call returns 
zero (no more credit) - is that correct?

Furthermore, it appears that then engine api requires the sending application 
acknowledge the drain request by calling pn_link_drained() on the sending link. 
 But I don't see an engine interface that notifies the application that a drain 
has been requested for the link.

Are we missing a "get drain flag" api call for the sender link?

thanks,

-K

Reply via email to