KafkaServerStartable — Thin Management Layer over KafkaServer

KafkaServerStartable is a thin management layer to manage a single KafkaServer instance.

KafkaServerStartable KafkaServer.png
Figure 1. KafkaServerStartable manages KafkaServer

KafkaServerStartable allows for the KafkaServer instance to be started, shut down and waited for until shutdown.

Table 1. KafkaServerStartable’s Internal Properties (e.g. Registries and Counters)
Name Description

server

KafkaServer instance.

Created when KafkaServerStartable is created.

awaitShutdown Method

Caution
FIXME

shutdown Method

shutdown(): Unit

shutdown…​FIXME

Note
shutdown is used exclusively when Kafka standalone application is requested to "shut down" (as part of the kafka-shutdown-hook shutdown hook).

Creating KafkaServerStartable Instance

KafkaServerStartable takes the following when created:

KafkaServerStartable initializes the internal registries and counters.

Creating KafkaServerStartable From Java Properties — fromProps Method

fromProps(serverProps: Properties): KafkaServerStartable

fromProps creates a KafkaServerStartable with a custom serverProps properties file.

Caution
FIXME
Note
fromProps is used when kafka.Kafka runs as a standalone command-line application

startup Method

startup(): Unit

startup requests the managed KafkaServer to start.

In case of any exceptions, startup exits the JVM with status 1. You should see the following FATAL message in the logs if that happens.

FATAL Exiting Kafka.
Note
startup uses Java’s System.exit to terminate a JVM.
Note
startup is used when kafka.Kafka command-line application (kafka-server-start) is executed.

results matching ""

    No results matching ""