Bird
0
0

What error or behavior occurs when attempting to create a Kafka topic with --partitions 0 using the CLI?

medium📝 Predict Output Q5 of 15
Kafka - Performance Tuning
What error or behavior occurs when attempting to create a Kafka topic with --partitions 0 using the CLI?
AThe topic is created with a default of 1 partition
BThe command fails because partition count must be at least 1
CThe topic is created but cannot receive messages
DThe command succeeds but partitions are assigned dynamically later
Step-by-Step Solution
Solution:
  1. Step 1: Check partition count constraints

    Kafka requires at least one partition per topic.
  2. Step 2: CLI validation

    Setting partitions to 0 is invalid and causes the CLI to reject the command.
  3. Final Answer:

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

    Partition count cannot be zero [OK]
Quick Trick: Partition count must be >= 1 [OK]
Common Mistakes:
MISTAKES
  • Assuming Kafka auto-corrects zero partitions to one
  • Believing topic can exist without partitions
  • Thinking partitions can be assigned later dynamically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes