Skip to content

KafkaServer

KafkaServer is a Server that Kafka command-line application uses in Zookeeper mode (when executed with the process.roles configuration property undefined).

Creating Instance

KafkaServer takes the following to be created:

  • KafkaConfig
  • Time (default: SYSTEM)
  • Optional Thread Name Prefix (default: undefined)
  • enableForwarding flag (default: false)

KafkaServer is created when:

TransactionCoordinator

KafkaServer creates and starts a TransactionCoordinator when created.

KafkaServer uses the TransactionCoordinator to create the following:

The TransactionCoordinator is requested to shutdown along with KafkaServer.

Data-Plane Request Processor

KafkaServer creates a KafkaApis for data-related communication.

KafkaApis is used to create data-plane request handler pool.

KafkaRequestHandlerPool

Control-Plane Request Processor

KafkaServer creates a KafkaApis for control-related communication.

startup

startup(): Unit

startup prints out the following INFO message to the logs:

starting

startup initZkClient and creates a ZkConfigRepository.

startup...FIXME

startup prints out the following INFO message to the logs:

Cluster ID = [clusterId]

startup...FIXME

startup creates a TransactionCoordinator (with the ReplicaManager) and requests it to startup.

startup...FIXME

startup is part of the Server abstraction.

Logging

Enable ALL logging level for kafka.server.KafkaServer logger to see what happens inside.

Add the following line to log4j.properties:

log4j.logger.kafka.server.KafkaServer=ALL

Refer to Logging.

Back to top