【发布时间】:2016-11-26 18:29:31
【问题描述】:
Netty 4 发出警告“丢弃 1 条到达管道末端的入站消息。请检查您的管道配置”。这是什么意思?应该如何处理? (以前reproduced here 直到根据接受的答案解决,但我宁愿对它的含义和管道如何工作有一个一般性的解释)
为了最大化netty反馈,客户端管道设置如下:
pipeline.addLast("logger", new LoggingHandler(LogLevel.TRACE))
pipeline.addLast("HttpRequestEncoder", new HttpClientCodec)
pipeline.addLast("handler", new myHandler)
当 Netty 发送两条 http 消息并被服务器端成功接收和确认时,我在客户端登录的所有内容是:
12 [main] DEBUG io.netty.util.internal.InternalLoggerFactory - Using Log4J as the default logging framework
164 [nioEventLoopGroup-1-2] DEBUG io.netty.channel.nio.SelectorUtil - Using select timeout of 500
164 [nioEventLoopGroup-1-2] DEBUG io.netty.channel.nio.SelectorUtil - Epoll-bug workaround enabled = false
229 [nioEventLoopGroup-1-2] WARN io.netty.channel.DefaultChannelPipeline - Discarded 1 inbound message(s) that reached at the end of the pipeline. Please check your pipeline configuration.
230 [nioEventLoopGroup-1-2] WARN io.netty.channel.DefaultChannelPipeline - Discarded 1 inbound message(s) that reached at the end of the pipeline. Please check your pipeline configuration.
而日志记录是这样设置的:
BasicConfigurator.configure
InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory)
【问题讨论】:
标签: netty