I assume I basically have to change interest ops on the channel when the buffer is empty/full?<br><br>Kevin<br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 4:18 PM, Kevin Burton <span dir="ltr">&lt;<a href="mailto:burtonator@gmail.com">burtonator@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">How do I tell the sender of data (I control both) to back off if I can&#39;t accept any more data on the server?<br>

<br>Specifically, I have an HTTP PUT implementation that first writes to a queue and then I drain the queue to disk. <br>
<br>When the queue fills up because the server is overloaded, I need a way to tell the sender to back off... <br><br>Normally the TCP buffers would just fill up on both ends and the sender wouldn&#39;t receive ACKs any more and wouldn&#39;t send more packets until the existing ones have been ack&#39;d ...<br>


<br>I just don&#39;t now how to tell Netty to stop sending me data because I can&#39;t handle it... <br><br>I don&#39;t want to use any threads in my application if they&#39;re not needed.<br>
</blockquote></div><br>