如果a NioEventLoopGroup用作a workerGroup,则ByteToMessageDecoder处理程序(用于单个连接)之后的消息将通过后续处理程序以顺序(单线程)方式处理NioEventLoop.
ByteToMessageDecoder处理程序之后是否有可能让其他«工人» 处理它们?
是的,只需添加ChannelHandler一个特殊EventExecutorGroup的ChannelPipeline.例如UnorderedThreadPoolEventExecutor(src).
所以类似于:
UnorderedThreadPoolEventExecutor executorGroup = ...;
pipeline.addLast(executorGroup, new MyChannelHandler());
Run Code Online (Sandbox Code Playgroud)