Bird
0
0

What is wrong with this Kafka consumer configuration snippet?

medium📝 Debug Q6 of 15
Kafka - Consumers

What is wrong with this Kafka consumer configuration snippet?

props.put("enable.auto.commit", "true");
AMissing bootstrap.servers configuration
BThe property name is incorrect
Cenable.auto.commit cannot be set to true
DThe value should be a boolean, not a string
Step-by-Step Solution
Solution:
  1. Step 1: Check property value type

    The enable.auto.commit property expects a boolean value, not a string.
  2. Step 2: Identify the error

    Passing "true" as a string will cause the consumer to misinterpret the setting.
  3. Final Answer:

    The value should be a boolean, not a string -> Option D
  4. Quick Check:

    Boolean properties must be set as boolean, not string [OK]
Quick Trick: Boolean configs require boolean values, not strings [OK]
Common Mistakes:
  • Passing boolean values as strings
  • Misspelling property names
  • Ignoring required bootstrap.servers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes