Recall & Review
beginner
What is a Kafka topic?
A Kafka topic is a category or feed name to which records are published. It acts like a folder where messages are stored and organized.
Click to reveal answer
beginner
How do you create a Kafka topic using the command line?
You use the command
kafka-topics.sh --create --topic <topic-name> --bootstrap-server <server> --partitions <num> --replication-factor <num> to create a topic.Click to reveal answer
intermediate
What does the replication factor mean in Kafka topic creation?
Replication factor is the number of copies of the topic's data across different Kafka brokers. It helps with fault tolerance.
Click to reveal answer
intermediate
Why do you specify the number of partitions when creating a Kafka topic?
Partitions allow Kafka to split data into smaller parts for parallel processing and scalability. More partitions mean better throughput.
Click to reveal answer
beginner
Can Kafka topics be created automatically?
Yes, Kafka can auto-create topics when a producer or consumer tries to use a non-existing topic if the broker is configured to allow it.
Click to reveal answer
Which command option is used to create a Kafka topic?
✗ Incorrect
The option '--create' is used with kafka-topics.sh to create a new topic.
What does the replication factor control in a Kafka topic?
✗ Incorrect
Replication factor controls how many copies of the topic data exist on different brokers for fault tolerance.
Why are partitions important in Kafka topics?
✗ Incorrect
Partitions split data to allow multiple consumers to read in parallel, improving throughput.
What happens if you try to produce to a non-existing topic and auto-creation is enabled?
✗ Incorrect
Kafka can auto-create the topic if configured, so the message is accepted.
Which of these is NOT a parameter when creating a Kafka topic?
✗ Incorrect
Message format is not specified during topic creation; it is handled by producers and consumers.
Explain how to create a Kafka topic using the command line and why you need to specify partitions and replication factor.
Think about how Kafka handles data distribution and fault tolerance.
You got /3 concepts.
Describe what happens when Kafka auto-creates a topic and when this feature might be useful or risky.
Consider convenience versus control.
You got /3 concepts.