mrhbj opened a new issue #3545:
URL: https://github.com/apache/rocketmq/issues/3545


          NettyRemotingClient.java 
          Bootstrap handler = 
this.bootstrap.group(this.eventLoopGroupWorker).channel(NioSocketChannel.class)
               .option(ChannelOption.TCP_NODELAY, true)
               .option(ChannelOption.SO_KEEPALIVE, false)
               .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 
nettyClientConfig.getConnectTimeoutMillis())
               .option(ChannelOption.SO_SNDBUF, 
nettyClientConfig.getClientSocketSndBufSize())
               .option(ChannelOption.SO_RCVBUF, 
nettyClientConfig.getClientSocketRcvBufSize())
               .handler(new ChannelInitializer<SocketChannel>() {
                   @Override
                   public void initChannel(SocketChannel ch) throws Exception {
                       ChannelPipeline pipeline = ch.pipeline();
                       if (nettyClientConfig.isUseTLS()) {
                           if (null != sslContext) {
                               pipeline.addFirst(defaultEventExecutorGroup, 
"sslHandler", sslContext.newHandler(ch.alloc()));
                               log.info("Prepend SSL handler");
                           } else {
                               log.warn("Connections are insecure as SSLContext 
is null!");
                           }
                       }
                       pipeline.addLast(
                           defaultEventExecutorGroup,
                           new NettyEncoder(),
                           new NettyDecoder(),
                           new IdleStateHandler(0, 0, 
nettyClientConfig.getClientChannelMaxIdleTimeSeconds()),
                           new NettyConnectManageHandler(),
                           new NettyClientHandler());
                   }
               });
   Bootstrap handler  Is it necessary? because it look like not used this 
handler name!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to