gianm commented on issue #6014: Optionally refuse to consume new data until the 
prior chunk is being consumed
URL: https://github.com/apache/incubator-druid/pull/6014#issuecomment-409518597
 
 
   Mucking with auto-read seems to be a viable approach: 
http://normanmaurer.me/presentations/2014-http-netty/slides.html#47.0, 
https://stackoverflow.com/questions/28273305/why-netty-4-proxy-example-has-to-set-channel-auto-read-as-false.
   
   It might be time to move to a Netty 4.x based HTTP client: 
https://netty.io/wiki/new-and-noteworthy-in-4.0.html
   
   > 3.x had an unintuitive inbound traffic suspension mechanism provided by 
Channel.setReadable(boolean). It introduced complicated interactions between 
ChannelHandlers and the handlers were easy to interfere with each other if 
implemented incorrectly.
   >
   >In 4.0, a new outbound operation called read() has been added. If you turn 
off the default auto-read flag with Channel.config().setAutoRead(false), Netty 
will not read anything until you explicitly invoke the read() operation. Once 
the read() operation you issue is complete and the channel again stops reading, 
an inbound event called channelReadSuspended() will be triggered so that you 
can re-issue another read() operation. You can also intercept a read() 
operation to perform more advanced traffic control.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to