KafkaRequestHandler is a thread of execution (i.e. Java’s Runnable) that is responsible for relaying client requests (from RequestChannel) to KafkaApis (except ShutdownRequest requests that are handled directly).

KafkaRequestHandler is created exclusively when KafkaRequestHandlerPool is created (and starts the internal runnables threads).

KafkaRequestHandler start.png
Figure 1. KafkaRequestHandler’s Startup and Request Relay

logIdent is [Kafka Request Handler [id] on Broker [brokerId]].


Enable DEBUG or TRACE logging levels for kafka.server.KafkaRequestHandler logger to see what happens inside.

Add the following line to config/log4j.properties:


Refer to Logging.

Starting Thread — run Method

run(): Unit
run is used when KafkaRequestHandlerPool is created.

Creating KafkaRequestHandler Instance

KafkaRequestHandler takes the following when created:

  • ID

  • Broker ID

  • Aggregate Idle Meter

  • Total number of handler threads

  • RequestChannel

  • KafkaApis

  • Time

KafkaRequestHandler initializes the internal registries and counters.

results matching ""

    No results matching ""