Bird
Raised Fist0

Which of the following is the correct syntax to disable auto commit in Kafka consumer config?

easy📝 Syntax Q3 of Q15
Kafka - Message Delivery Semantics
Which of the following is the correct syntax to disable auto commit in Kafka consumer config?
A"autoCommit": false
B"auto.commit.enable": false
C"enableAutoCommit": "false"
D"enable.auto.commit": false
Step-by-Step Solution
Solution:
  1. Step 1: Recall Kafka consumer config keys

    The correct key to disable auto commit is "enable.auto.commit" and it expects a boolean value.
  2. Step 2: Check option syntax correctness

    "enable.auto.commit": false uses the correct key and boolean false without quotes, matching Kafka config syntax.
  3. Final Answer:

    "enable.auto.commit": false -> Option D
  4. Quick Check:

    Disable auto commit = "enable.auto.commit": false [OK]
Quick Trick: Use exact config key "enable.auto.commit" to disable auto commit [OK]
Common Mistakes:
MISTAKES
  • Using wrong config keys
  • Passing boolean as string instead of boolean
  • Mixing camelCase and dot notation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes