Challenge - 5 Problems
Kafka Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this Kafka console producer command?
You run the following command to send a message to a Kafka topic named test-topic. What will be the output shown in the terminal after sending the message?
Kafka
echo "Hello Kafka" | kafka-console-producer.sh --broker-list localhost:9092 --topic test-topic
Attempts:
2 left
💡 Hint
The console producer command sends the message silently unless there is an error.
✗ Incorrect
The kafka-console-producer.sh command sends the message to the broker silently. It does not print the message or any confirmation unless there is an error.
🧠 Conceptual
intermediate1:30remaining
Which service must be running before starting Kafka broker?
Before starting the Kafka broker, which service must be running to ensure Kafka works properly?
Attempts:
2 left
💡 Hint
Kafka uses this service to manage cluster metadata and leader election.
✗ Incorrect
Kafka depends on Zookeeper to manage cluster metadata and coordinate brokers. Zookeeper must be running before Kafka starts.
🔧 Debug
advanced2:30remaining
Why does Kafka broker fail to start with this error?
You try to start Kafka broker but get this error: ERROR Fatal error during KafkaServer startup. The logs show Port 9092 already in use. What is the most likely cause?
Kafka
bin/kafka-server-start.sh config/server.properties
Attempts:
2 left
💡 Hint
Check if any other process is using the default Kafka port.
✗ Incorrect
The error indicates port 9092 is busy, so Kafka cannot bind to it. This usually means another Kafka broker or process is running on that port.
📝 Syntax
advanced2:00remaining
Which command correctly creates a Kafka topic named 'orders' with 3 partitions?
Select the correct command to create a Kafka topic named orders with 3 partitions and a replication factor of 1.
Attempts:
2 left
💡 Hint
Check the exact option names and syntax for partitions and replication factor.
✗ Incorrect
Option A uses the correct option names and syntax for creating a topic with partitions and replication factor using --bootstrap-server.
🚀 Application
expert3:00remaining
How to configure Kafka broker to listen on all network interfaces?
You want your Kafka broker to accept connections from any IP address on your machine. Which configuration setting in
server.properties achieves this?Attempts:
2 left
💡 Hint
The listeners setting controls where Kafka binds to accept connections.
✗ Incorrect
Setting listeners=PLAINTEXT://0.0.0.0:9092 makes Kafka listen on all network interfaces. advertised.listeners controls what Kafka tells clients to connect to.