Disconnecting a Netty Simple Handler Connection

The Netty channel handler is channelClosed ()blocked when another message is received at messageReceived().
I used OrderedMemoryAwareThreadPoolExecutorto synchronize messages.
Is the channelClosed()thread running with low priority.?

Could you talk about the priority of the stream in netty. Thanks you

    objChannelPipeline.addLast("ipFilter", objCustomIPFilterHandler);
    objChannelPipeline.addLast("idleHandler", new IdleStateHandler(timer,5,5, 0));
    objChannelPipeline.addLast("loggingHandler", objLoggingHandler);        
    objChannelPipeline.addLast("frameDecoder",
            new DelimiterBasedFrameDecoder(Integer.MAX_VALUE, false, ChannelBuffers.copiedBuffer("\n\n".getBytes(CharsetUtil.UTF_8))));
    objChannelPipeline.addLast("messageDecoder", new CustomMessageDecoder());
    objChannelPipeline.addLast("groupOrder", executionHandler);
    objChannelPipeline.addLast("ProtocolMultiplexer", CustomHandler);
+5
source share
1 answer

I think this is because you are using OrderedMemoryAwareThreadPoolExecutor, in which case the events will be executed in the order in which they occur. Therefore, messageReceived()will always be executed before channelClose().

, 3 , , messageReceived, channelClose().

MemoryAwareThreadPoolExecutor, channelClose messageReceived(), .

, !

+2

All Articles