Bird
0
0

You tried to create a Kafka topic with 0 partitions using the command: kafka-topics --create --topic test --num-partitions 0 --bootstrap-server localhost:9092. What is the likely issue?

medium📝 Debug Q14 of 15
Kafka - Performance Tuning
You tried to create a Kafka topic with 0 partitions using the command: kafka-topics --create --topic test --num-partitions 0 --bootstrap-server localhost:9092. What is the likely issue?
AKafka allows 0 partitions, so topic created with no data storage
BError because partition count must be at least 1
CTopic created with default partition count of 1
DCommand ignored the partition count and created topic anyway
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition count constraints

    Kafka requires at least one partition per topic; zero is invalid.
  2. Step 2: Identify command behavior

    Setting partitions to 0 causes an error because Kafka cannot create a topic without partitions.
  3. Final Answer:

    Error because partition count must be at least 1 -> Option B
  4. Quick Check:

    Partition count ≥ 1 required [OK]
Quick Trick: Partition count cannot be zero or negative [OK]
Common Mistakes:
  • Assuming Kafka defaults to 1 partition silently
  • Thinking zero partitions means no data but topic exists
  • Ignoring error messages from Kafka CLI

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes