Bird
Raised Fist0

Which of the following is the correct way to specify a Kafka broker address in a configuration file?

easy📝 Syntax Q3 of Q15
Kafka - with Java/Python
Which of the following is the correct way to specify a Kafka broker address in a configuration file?
Abroker.address=localhost:9092
Bbootstrap.servers=localhost:9092
Cserver.address=localhost:9092
Dkafka.broker=localhost:9092
Step-by-Step Solution
Solution:
  1. Step 1: Recall Kafka broker address property

    The standard property to specify Kafka brokers is 'bootstrap.servers'.
  2. Step 2: Match correct syntax

    Only 'bootstrap.servers=localhost:9092' matches Kafka's expected config key.
  3. Final Answer:

    bootstrap.servers=localhost:9092 -> Option B
  4. Quick Check:

    Broker address config = bootstrap.servers [OK]
Quick Trick: Use 'bootstrap.servers' to set Kafka broker addresses [OK]
Common Mistakes:
MISTAKES
  • Using incorrect property names like 'broker.address'
  • Confusing server and broker terminology
  • Misspelling the property key

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes