Confluent
CCDAK · Question #84
How do you create a topic named test with 3 partitions and 3 replicas using the Kafka CLI?
The correct answer is C. bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --. As of Kafka 2.3, the kafka-topics.sh command can take --bootstrap-server localhost:9092 as an argument. You could also use the (now deprecated) option of --zookeeper localhost:2181.
Deployment and Troubleshooting
Question
How do you create a topic named test with 3 partitions and 3 replicas using the Kafka CLI?
Options
- Abin/kafka-topics.sh --create --broker-list localhost:9092 --replication-factor 3 --partitions 3 --topic
- Bbin/kafka-topics-create.sh --zookeeper localhost:9092 --replication-factor 3 --partitions 3 --topic
- Cbin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 3 --partitions 3 --
- Dbin/kafka-topics.sh --create --bootstrap-server localhost:2181 --replication-factor 3 --partitions 3 --
How the community answered
(28 responses)- A4% (1)
- C89% (25)
- D7% (2)
Explanation
As of Kafka 2.3, the kafka-topics.sh command can take --bootstrap-server localhost:9092 as an argument. You could also use the (now deprecated) option of --zookeeper localhost:2181.
Topics
#kafka-topics.sh#bootstrap-server#topic creation#CLI
Community Discussion
No community discussion yet for this question.