Bird
0
0

In Kafka client configuration for Amazon MSK, how should the bootstrap.servers property be formatted?

easy📝 Syntax Q3 of 15
Kafka - Kubernetes and Cloud Deployment
In Kafka client configuration for Amazon MSK, how should the bootstrap.servers property be formatted?
AA single IP address without port, e.g., <code>192.168.1.1</code>
BA comma-separated list of broker DNS names and ports, e.g., <code>broker1.msk.amazonaws.com:9092,broker2.msk.amazonaws.com:9092</code>
CA URL starting with <code>https://</code>, e.g., <code>https://msk-cluster.amazonaws.com</code>
DA JSON array of broker hostnames, e.g., <code>["broker1", "broker2"]</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand bootstrap.servers format

    The bootstrap.servers property requires a comma-separated list of broker hostnames with ports.
  2. Step 2: Analyze options

    A comma-separated list of broker DNS names and ports, e.g., broker1.msk.amazonaws.com:9092,broker2.msk.amazonaws.com:9092 correctly shows the format with DNS names and ports separated by commas.
  3. Step 3: Reject invalid formats

    A single IP address without port, e.g., 192.168.1.1 lacks port information, C uses an incorrect URL scheme, and D uses JSON which is not valid here.
  4. Final Answer:

    Comma-separated list of broker DNS names and ports -> Option B
  5. Quick Check:

    Bootstrap servers require host:port list separated by commas [OK]
Quick Trick: Use comma-separated host:port pairs for bootstrap.servers [OK]
Common Mistakes:
  • Omitting port numbers in bootstrap.servers
  • Using HTTPS URLs instead of host:port
  • Passing JSON arrays instead of strings

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes