KafkaRequestHandler

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]].

Tip

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

Add the following line to config/log4j.properties:

log4j.logger.kafka.server.KafkaRequestHandler=TRACE

Refer to Logging.

Starting Thread — run Method

run(): Unit
Caution
FIXME
Note
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 ""