pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] erenavsarogullari commented on a change in pull request #3295: issue #3276 Pulsar IO connector for udp source
Date Thu, 03 Jan 2019 22:34:57 GMT
erenavsarogullari commented on a change in pull request #3295:  issue #3276 Pulsar IO connector
for udp source
URL: https://github.com/apache/pulsar/pull/3295#discussion_r245155407
 
 

 ##########
 File path: pulsar-io/netty/src/main/java/org/apache/pulsar/io/netty/server/NettyServer.java
 ##########
 @@ -56,17 +62,16 @@ public void run() {
             bossGroup = new NioEventLoopGroup(this.numberOfThreads);
             workerGroup = new NioEventLoopGroup(this.numberOfThreads);
 
-            ServerBootstrap serverBootstrap = new ServerBootstrap();
-            serverBootstrap.group(bossGroup, workerGroup)
-                    .channel(NioServerSocketChannel.class)
-                    .childHandler(new NettyChannelInitializer(new NettyTcpServerHandler(this.nettyTcpSource)))
-                    .option(ChannelOption.SO_BACKLOG, 1024)
-                    .childOption(ChannelOption.SO_KEEPALIVE, true);
+            if (type.equalsIgnoreCase(TCP)) {
 
 Review comment:
   `switch statement` can also be preferred here to run Tcp/Udp server.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message