Bird
0
0

Find the mistake in this Kafka topic creation command:

medium📝 Debug Q7 of 15
Kafka - Topics and Partitions

Find the mistake in this Kafka topic creation command:

kafka-topics.sh --create --topic testTopic --partitions two --bootstrap-server localhost:9092

AThe partitions value must be a number, not a word
BThe --bootstrap-server flag is missing
CThe --topic flag is incorrect
DThe command is missing --replication-factor
Step-by-Step Solution
Solution:
  1. Step 1: Check partitions argument type

    Partitions must be an integer; 'two' is invalid syntax.
  2. Step 2: Confirm other flags

    --bootstrap-server and --topic flags are correct and present.
  3. Final Answer:

    The partitions value must be a number, not a word -> Option A
  4. Quick Check:

    Partitions must be numeric [OK]
Quick Trick: Use numbers, not words, for partition count [OK]
Common Mistakes:
  • Using words instead of numbers for partitions
  • Thinking --bootstrap-server is missing
  • Confusing --topic flag syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes