Browse Source

KAFKA-6893; Create processors before starting acceptor in SocketServer (#4999)

pull/4997/head
Rajini Sivaram 7 years ago committed by Jason Gustafson
parent
commit
7ed7cca4c9
  1. 2
      core/src/main/scala/kafka/network/SocketServer.scala

2
core/src/main/scala/kafka/network/SocketServer.scala

@ -146,10 +146,10 @@ class SocketServer(val config: KafkaConfig, val metrics: Metrics, val time: Time @@ -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)
}
}

Loading…
Cancel
Save