From 7ed7cca4c9ee854432132a4fbf9be9d655dabbf2 Mon Sep 17 00:00:00 2001 From: Rajini Sivaram Date: Thu, 10 May 2018 22:17:59 +0100 Subject: [PATCH] KAFKA-6893; Create processors before starting acceptor in SocketServer (#4999) --- core/src/main/scala/kafka/network/SocketServer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/kafka/network/SocketServer.scala b/core/src/main/scala/kafka/network/SocketServer.scala index 27d89b48a72..639f79936a1 100644 --- a/core/src/main/scala/kafka/network/SocketServer.scala +++ b/core/src/main/scala/kafka/network/SocketServer.scala @@ -146,10 +146,10 @@ class SocketServer(val config: KafkaConfig, val metrics: Metrics, val time: Time val securityProtocol = endpoint.securityProtocol val acceptor = new Acceptor(endpoint, sendBufferSize, recvBufferSize, brokerId, connectionQuotas) + addProcessors(acceptor, endpoint, processorsPerListener) KafkaThread.nonDaemon(s"kafka-socket-acceptor-$listenerName-$securityProtocol-${endpoint.port}", acceptor).start() acceptor.awaitStartup() acceptors.put(endpoint, acceptor) - addProcessors(acceptor, endpoint, processorsPerListener) } }