Bird
0
0

Which of the following is the correct way to specify the number of partitions when creating a Kafka topic using the command line?

easy📝 Syntax Q12 of 15
Kafka - Topics and Partitions

Which of the following is the correct way to specify the number of partitions when creating a Kafka topic using the command line?

kafka-topics.sh --create --topic my-topic --bootstrap-server localhost:9092 --partitions ?
A--num-partitions 3
B--partition-count 3
C--partitions 3
D--partition 3
Step-by-Step Solution
Solution:
  1. Step 1: Recall Kafka topic creation syntax

    The correct option to specify partitions is '--partitions' followed by the number.
  2. Step 2: Match the correct option

    Among the options, '--partitions 3' is the valid syntax for setting 3 partitions.
  3. Final Answer:

    --partitions 3 -> Option C
  4. Quick Check:

    Partitions flag = --partitions [OK]
Quick Trick: Use --partitions to set number when creating topic [OK]
Common Mistakes:
  • Using --partition-count instead of --partitions
  • Using --num-partitions which is invalid
  • Using singular --partition flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes