Skip to content

Instantly share code, notes, and snippets.

@ardlema
Last active December 13, 2017 16:44
Show Gist options
  • Save ardlema/d059931239cceb5886268d62ee8afe9b to your computer and use it in GitHub Desktop.
Save ardlema/d059931239cceb5886268d62ee8afe9b to your computer and use it in GitHub Desktop.
Creation of Acceptor within the Kafka's SocketServer
/**
* Thread that accepts and configures new connections. There is one of these per endpoint.
*/
private[kafka] class Acceptor(val endPoint: EndPoint,
val sendBufferSize: Int,
val recvBufferSize: Int,
brokerId: Int,
processors: Array[Processor],
connectionQuotas: ConnectionQuotas) extends AbstractServerThread(connectionQuotas) with KafkaMetricsGroup {
...
processors.foreach { processor =>
KafkaThread.nonDaemon(s"kafka-network-thread-$brokerId-${endPoint.listenerName}-${endPoint.securityProtocol}-${processor.id}",
processor).start()
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment