@@ -31,9 +31,9 @@ public class NettyHttpServer implements Runnable, Closeable {
31
31
private final ThreadPoolExecutor executorGroup ;
32
32
private final HttpResponseStatus responseStatus ;
33
33
34
- public NettyHttpServer (String host , int port , IMessageHandler messageHandler ,
35
- SslHandlerProvider sslHandlerProvider , int threads ,
36
- int maxPendingRequests , int maxContentLength , int responseCode )
34
+ public NettyHttpServer (final String id , final String host , final int port , final IMessageHandler messageHandler ,
35
+ final SslHandlerProvider sslHandlerProvider , final int threads ,
36
+ final int maxPendingRequests , final int maxContentLength , final int responseCode )
37
37
{
38
38
this .host = host ;
39
39
this .port = port ;
@@ -42,12 +42,12 @@ public NettyHttpServer(String host, int port, IMessageHandler messageHandler,
42
42
// boss group is responsible for accepting incoming connections and sending to worker loop
43
43
// process group is channel handler, see the https://github.com/netty/netty/discussions/13305
44
44
// see the https://github.com/netty/netty/discussions/11808#discussioncomment-1610918 for why separation is good
45
- bossGroup = new NioEventLoopGroup (1 , daemonThreadFactory ("http-input-connector " ));
46
- processorGroup = new NioEventLoopGroup (threads , daemonThreadFactory ("http-input-processor " ));
45
+ bossGroup = new NioEventLoopGroup (1 , daemonThreadFactory (id + "-bossGroup " ));
46
+ processorGroup = new NioEventLoopGroup (threads , daemonThreadFactory (id + "-processorGroup " ));
47
47
48
48
// event handler group
49
49
executorGroup = new ThreadPoolExecutor (threads , threads , 0 , TimeUnit .MILLISECONDS ,
50
- new ArrayBlockingQueue <>(maxPendingRequests ), daemonThreadFactory ("http-input-handler-executor " ),
50
+ new ArrayBlockingQueue <>(maxPendingRequests ), daemonThreadFactory (id + "-executorGroup " ),
51
51
new CustomRejectedExecutionHandler ());
52
52
53
53
final HttpInitializer httpInitializer = new HttpInitializer (messageHandler , executorGroup ,
0 commit comments