Bird
0
0

Given the following snippet from a Kafka server.properties file:

medium📝 Predict Output Q13 of 15
Kafka - Cluster Architecture

Given the following snippet from a Kafka server.properties file:

broker.id=2
listeners=PLAINTEXT://localhost:9093
log.dirs=/tmp/kafka-logs-2

What will be the broker's ID and listening port when Kafka starts?

ABroker ID 1, listening on port 9092
BBroker ID 2, listening on port 9093
CBroker ID 2, listening on port 9092
DBroker ID 1, listening on port 9093
Step-by-Step Solution
Solution:
  1. Step 1: Identify broker ID from properties

    The property broker.id=2 sets the broker ID to 2.
  2. Step 2: Identify listener port

    listeners=PLAINTEXT://localhost:9093 means the broker listens on port 9093.
  3. Final Answer:

    Broker ID 2, listening on port 9093 -> Option B
  4. Quick Check:

    broker.id=2 and port=9093 [OK]
Quick Trick: Broker ID and port come directly from properties file [OK]
Common Mistakes:
  • Assuming default port 9092 without checking listeners
  • Mixing up broker IDs
  • Ignoring the listeners property

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes