diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f92e9e0..77e4d4ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.1.1 + - Properly naming netty threads [#191](https://github.com/logstash-plugins/logstash-input-http/pull/191) + ## 4.1.0 - add improved proactive rate-limiting, rejecting new requests when queue has been actively blocking for more than 10 seconds [#186](https://github.com/logstash-plugins/logstash-input-http/pull/186) - This is a forward-port of functionality also introduced to the 3.x series in v3.10.0 diff --git a/VERSION b/VERSION index ee74734a..627a3f43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0 +4.1.1 diff --git a/lib/logstash/inputs/http.rb b/lib/logstash/inputs/http.rb index 342dc42c..1d4f8f5d 100644 --- a/lib/logstash/inputs/http.rb +++ b/lib/logstash/inputs/http.rb @@ -324,7 +324,8 @@ def setup_ssl_params! def create_http_server(message_handler) org.logstash.plugins.inputs.http.NettyHttpServer.new( - @host, @port, message_handler, build_ssl_params, @threads, @max_pending_requests, @max_content_length, @response_code) + @id, @host, @port, message_handler, build_ssl_params, @threads, + @max_pending_requests, @max_content_length, @response_code) end def build_ssl_params diff --git a/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java b/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java index f578cef6..c7498ff2 100644 --- a/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java +++ b/src/main/java/org/logstash/plugins/inputs/http/NettyHttpServer.java @@ -31,9 +31,9 @@ public class NettyHttpServer implements Runnable, Closeable { private final ThreadPoolExecutor executorGroup; private final HttpResponseStatus responseStatus; - public NettyHttpServer(String host, int port, IMessageHandler messageHandler, - SslHandlerProvider sslHandlerProvider, int threads, - int maxPendingRequests, int maxContentLength, int responseCode) + public NettyHttpServer(final String id, final String host, final int port, final IMessageHandler messageHandler, + final SslHandlerProvider sslHandlerProvider, final int threads, + final int maxPendingRequests, final int maxContentLength, final int responseCode) { this.host = host; this.port = port; @@ -42,12 +42,12 @@ public NettyHttpServer(String host, int port, IMessageHandler messageHandler, // boss group is responsible for accepting incoming connections and sending to worker loop // process group is channel handler, see the https://github.com/netty/netty/discussions/13305 // see the https://github.com/netty/netty/discussions/11808#discussioncomment-1610918 for why separation is good - bossGroup = new NioEventLoopGroup(1, daemonThreadFactory("http-input-connector")); - processorGroup = new NioEventLoopGroup(threads, daemonThreadFactory("http-input-processor")); + bossGroup = new NioEventLoopGroup(1, daemonThreadFactory(id + "-bossGroup")); + processorGroup = new NioEventLoopGroup(threads, daemonThreadFactory(id + "-processorGroup")); // event handler group executorGroup = new ThreadPoolExecutor(threads, threads, 0, TimeUnit.MILLISECONDS, - new ArrayBlockingQueue<>(maxPendingRequests), daemonThreadFactory("http-input-handler-executor"), + new ArrayBlockingQueue<>(maxPendingRequests), daemonThreadFactory(id + "-executorGroup"), new CustomRejectedExecutionHandler()); final HttpInitializer httpInitializer = new HttpInitializer(messageHandler, executorGroup,