BeginnerOperations
What is the kafka-topics.sh tool used for?
Reference answer
kafka-topics.sh is the command-line tool for managing topics, and it connects with --bootstrap-server. --create makes a topic (with --partitions, --replication-factor and --config for per-topic overrides of the broker defaults), --list lists topics, --describe shows the partition count, replication factor, configs and each partition's leader, replicas and ISR, --delete removes a topic, and --alter changes the number of partitions or the replica assignment. Adding partitions does not redistribute existing data, and Kafka does not support reducing the number of partitions. Topic configuration is changed with kafka-configs.sh (--alter --add-config), not with kafka-topics.sh, because --config is supported only together with --create. Example: kafka-topics.sh --create --bootstrap-server localhost:9092 --topic my-topic --partitions 3 --replication-factor 3
Expected key concepts: kafka-topics.sh, --bootstrap-server, --create, --list, --describe, --delete, --alter, --partitions, --replication-factor, kafka-configs.sh
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.