第36课:Kafka源码解读SocketServer下的Acceptor、Processor、Handler 1 socketServer下的NIO 2 Acceptor、Processor、Handler
/** * An NIO socket server. The threading model is * 1 Acceptor thread that handles new connections * Acceptor has N Processor threads that each have their own selector and read requests from sockets * M Handler threads that handle requests and produce responses back to the processor threads for writing. */
class SocketServer(val config: KafkaConfig, val metrics: Metrics, val time: Time) extends Logging