DefaultAutoTopicCreationManager¶
DefaultAutoTopicCreationManager
is an AutoTopicCreationManager.
Creating Instance¶
DefaultAutoTopicCreationManager
takes the following to be created:
- KafkaConfig
- Optional
BrokerToControllerChannelManager
- Optional ZkAdminManager
- Optional KafkaController
- GroupCoordinator
- TransactionCoordinator
DefaultAutoTopicCreationManager
is created when:
AutoTopicCreationManager
utility is used to create an AutoTopicCreationManagerBrokerServer
is requested to startup
TransactionCoordinator¶
DefaultAutoTopicCreationManager
is given a TransactionCoordinator when created.
DefaultAutoTopicCreationManager
uses the TransactionCoordinator
for the transactionTopicConfigs when requested to creatableTopic for __transaction_state topic.
createTopics¶
createTopics(
topics: Set[String],
controllerMutationQuota: ControllerMutationQuota,
metadataRequestContext: Option[RequestContext]): Seq[MetadataResponseTopic]
createTopics
is part of the AutoTopicCreationManager abstraction.
createTopics
filterCreatableTopics the given topics
.
createTopics
sendCreateTopicRequest when the controller is undefined or is not active and the channelManager is defined. Otherwise, createTopics
createTopicsInZk.
filterCreatableTopics¶
filterCreatableTopics(
topics: Set[String]): (Map[String, CreatableTopic], Seq[MetadataResponseTopic])
filterCreatableTopics
splits the topics
into CreatableTopics and with errors (e.g. invalid names or being created).
creatableTopic¶
creatableTopic(
topic: String): CreatableTopic
creatableTopic
creates a CreatableTopic
with the given topic
name.
Topic Name | Number of Partitions | Replication Factor | Configs |
---|---|---|---|
__consumer_offsets | offsets.topic.num.partitions | offsets.topic.replication.factor | offsetsTopicConfigs |
__transaction_state | transaction.state.log.num.partitions | transaction.state.log.replication.factor | transactionTopicConfigs |
other topics | num.partitions | default.replication.factor |
createTopicsInZk¶
createTopicsInZk(
creatableTopics: Map[String, CreatableTopic],
controllerMutationQuota: ControllerMutationQuota): Seq[MetadataResponseTopic]
createTopicsInZk
requests the ZkAdminManager to create the topics.