Complete the command to list all Kafka topics.
kafka-topics.sh --bootstrap-server localhost:9092 --[1]
The --list option shows all topics in Kafka.
Complete the command to create a topic named 'my-topic' with 3 partitions.
kafka-topics.sh --bootstrap-server localhost:9092 --create --topic my-topic --partitions [1]
The --partitions option sets how many partitions the topic will have. Here, 3 is specified.
Fix the error in the command to describe a topic named 'orders'.
kafka-topics.sh --bootstrap-server localhost:9092 --[1] orders
The --describe option shows details about a specific topic.
Fill both blanks to consume messages from 'my-topic' starting from the beginning.
kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic my-topic --[1] --[2]
The --from-beginning option starts consuming from the start of the topic. The --group option sets the consumer group.
Fill all three blanks to produce a message 'Hello' to 'my-topic' using the console producer.
echo "Hello" | kafka-console-producer.sh --bootstrap-server localhost:9092 --topic [1] --[2] [3]
The topic name is 'my-topic'. The --property option sets producer properties like acks which controls message acknowledgment.