KafkaRequestHandler
KafkaRequestHandler is a thread of execution (java.lang.Runnable) that is responsible for relaying client requests (from a RequestChannel) to a KafkaApis (except ShutdownRequest requests that are handled directly).
KafkaRequestHandler is created exclusively when KafkaRequestHandlerPool is created (and starts the internal runnables threads).
KafkaRequestHandler uses [Kafka Request Handler [id] on Broker [brokerId]] as the logging prefix (aka logIdent).
|
Tip
|
Enable Add the following line to
Refer to Logging. |
Creating KafkaRequestHandler Instance
KafkaRequestHandler takes the following to be created:
KafkaRequestHandler initializes the internal properties.
Starting KafkaRequestHandler Thread — run Method
run(): Unit
|
Note
|
run is part of the java.lang.Runnable to start itself as a separately-executing thread.
|
run runs continuously until KafkaRequestHandler is requested to stop (which turns the stopped internal flag on).
run…FIXME
Stopping KafkaRequestHandler Thread — stop Method
stop(): Unit
stop simply turns the stopped internal flag on (true).
|
Note
|
stop is used exclusively when KafkaRequestHandlerPool is requested to resize the thread pool of KafkaRequestHandlers.
|