Bird
0
0

Which configuration property is mandatory to specify the Kafka broker address when creating a Producer?

easy📝 Conceptual Q2 of 15
Kafka - Producers
Which configuration property is mandatory to specify the Kafka broker address when creating a Producer?
Agroup.id
Bbootstrap.servers
Cauto.offset.reset
Dkey.serializer
Step-by-Step Solution
Solution:
  1. Step 1: Identify broker connection property

    The property 'bootstrap.servers' tells the Producer where Kafka brokers are located.
  2. Step 2: Understand other properties

    'group.id' is for consumers, 'auto.offset.reset' controls consumer offset, 'key.serializer' is for serialization but not broker address.
  3. Final Answer:

    bootstrap.servers -> Option B
  4. Quick Check:

    Broker address config = bootstrap.servers [OK]
Quick Trick: Always set bootstrap.servers to connect Producer to Kafka [OK]
Common Mistakes:
  • Using consumer properties like group.id for Producer
  • Confusing serializer with broker address
  • Omitting bootstrap.servers causes connection failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes