KafkaConfig

KafkaConfig is the configuration of a Kafka server and the services.

KafkaConfig is created when:

Table 1. KafkaConfig’s Configuration Values
Value Kafka Property

advertisedListeners

Used when:

autoCreateTopicsEnable

autoLeaderRebalanceEnable

Used exclusively when KafkaController is requested to onControllerFailover

backgroundThreads

background.threads

brokerId

broker.id

brokerIdGenerationEnable

Used exclusively when KafkaServer is requested to getBrokerIdAndOfflineDirs

deleteTopicEnable

delete.topic.enable

hostName

host.name

interBrokerListenerName

interBrokerSecurityProtocol

leaderImbalanceCheckIntervalSeconds

Used exclusively when ControllerEventThread is requested to process a AutoPreferredReplicaLeaderElection event (while processing controller events)

listeners

listeners (see getListeners)

logDirs

At least one log directory must be defined via log.dirs or log.dir properties.

Used when:

maxReservedBrokerId

Used exclusively when KafkaServer is requested to generateBrokerId

numNetworkThreads

num.network.threads

port

port

replicaLagTimeMaxMs

tokenAuthEnabled

zkConnect

Used when:

zkEnableSecureAcls

Used when:

zkSessionTimeoutMs

Used when:

zkConnectionTimeoutMs

Used when:

zkMaxInFlightRequests

Used when:

Table 2. KafkaConfig’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

dynamicConfig

DynamicBrokerConfig (that could be provided or is going to be created from scratch)

Used when:

Creating Listeners — getListeners Internal Method

getListeners: Seq[EndPoint]

getListeners creates the EndPoints if defined using listeners Kafka property or defaults to PLAINTEXT://[hostName]:[port] (for hostName and port Kafka properties).

Note
getListeners is used when KafkaConfig is created and for getAdvertisedListeners.

getNumReplicaAlterLogDirsThreads Method

getNumReplicaAlterLogDirsThreads: Int

getNumReplicaAlterLogDirsThreads…​FIXME

Note
getNumReplicaAlterLogDirsThreads is used when…​FIXME

Creating KafkaConfig Instance

KafkaConfig takes the following when created:

KafkaConfig initializes the internal registries and counters.

Creating KafkaConfig From Java Properties — fromProps Object Method

fromProps(props: Properties): KafkaConfig (1)
fromProps(props: Properties, doLog: Boolean): KafkaConfig
fromProps(defaults: Properties, overrides: Properties): KafkaConfig (2)
fromProps(defaults: Properties, overrides: Properties, doLog: Boolean): KafkaConfig (3)
  1. Seems to be used in tests only

  2. Seems to be used in tests only

  3. Seems to be used in tests only

fromProps…​FIXME

Note

fromProps is used when:

Creating KafkaConfig — apply Factory Method

apply(props: java.util.Map[_, _]): KafkaConfig

apply simply creates a KafkaConfig with the props and the doLog flag on.

Note
apply seems to be used in tests only.

addReconfigurable Method

addReconfigurable(reconfigurable: Reconfigurable): Unit

addReconfigurable…​FIXME

Note
addReconfigurable is used when…​FIXME

validateValues Internal Method

validateValues(): Unit

validateValues…​FIXME

Note
validateValues is used when…​FIXME

getInterBrokerListenerNameAndSecurityProtocol Internal Method

getInterBrokerListenerNameAndSecurityProtocol: (ListenerName, SecurityProtocol)

getInterBrokerListenerNameAndSecurityProtocol…​FIXME

Note
getInterBrokerListenerNameAndSecurityProtocol is used when KafkaConfig is requested for interBrokerListenerName and interBrokerSecurityProtocol.

results matching ""

    No results matching ""