CCDAK practice question 25 of 25
If I produce to a topic that does not exist, and the broker setting auto.create.topic.enable=true, what will happen?
Full set: 150 questionsWhen a client requests metadata for a topic that does not exist (e.g., by producing a message to it) and the broker is configured with auto.create.topics.enable=true, the Kafka broker will automatically create the topic. The configuration for this new topic, specifically its partition count and replication factor, is determined by the broker's own default settings. The relevant broker configuration parameters are num.partitions and default.replication.factor. The client's settings do not influence the configuration of an auto-created topic.
A. This is incorrect because the partition count and replication factor are not hardcoded to 1. They are determined by the specific values set in the broker's configuration files.
B. This is incorrect because topic creation is a server-side (broker) operation. Producer clients do not have settings that dictate the partition count or replication factor for new topics.
D. This is incorrect because the number of partitions is not determined by the number of brokers, and the replication factor is not hardcoded to 3. Both are explicitly defined by broker configurations.
1. Confluent Documentation: In the Broker Configuration reference for Confluent Platform, it specifies the parameters used for auto-created topics:
auto.create.topics.enable: "Enable automatic creation of topics on the server."
num.partitions: "The default number of log partitions per topic."
default.replication.factor: "The default replication factor for automatically created topics."
Source: Confluent Platform 7.5 Documentation, "Broker Configuration Settings".
2. Apache Kafka Documentation: The official Apache Kafka documentation confirms this behavior in its broker configuration section.
num.partitions: "The default number of log partitions per topic." The documentation explicitly states this is the default used when a topic is created.
default.replication.factor: "default replication factors for auto created topics".
Source: Apache Kafka 3.7 Documentation, "Broker Configs", Section 3.3.
Keep practicing
Take the free CCDAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCDAK practice questions
- Question 1In Avro, removing or adding a field that has a default is a __ schema evolution
- Question 2A topic has three replicas and you set min.insync.replicas to 2. If two out of three repl…
- Question 3To get acknowledgement of writes to only the leader partition, we need to use the config.…
- Question 4A customer has many consumer applications that process messages from a Kafka topic. Each …
- Question 5What information isn't stored inside of Zookeeper? (select two)
- Question 6If you enable an SSL endpoint in Kafka, what feature of Kafka will be lost?
