Netty behavior when disconnecting a channel

Ric Klaren rklaren at educator.eu
Wed Jan 5 04:39:32 EST 2011


Hi,

On 4 January 2011 04:15, Trustin Lee <trustin at gmail.com> wrote:
> Netty will always read until there is nothing to read before disconnection.
>
> Once Netty reads data and triggers messageReceoved event with it, Netty forgets about it and it is up to the pipeline to handle it, discard it, or store it somewhere for later use.  Usually, a decoder will store it for later use to deal with fragmentation.  If data is lost, there is high chance where it is stored but not consumed completely somewhere in your pipeline.

My problem turned out to be that I did not use an Execution handler
and a OrderedMemoryAwareThreadPoolExecutor. Which I needed to be able
to block in ChannelHandler when my intermediate buffers filled up.

Thanks!

Ric



More information about the netty-users mailing list