Bird
Raised Fist0

If a Kafka consumer has enable.auto.commit set to false, what is the expected behavior?

medium📝 Predict Output Q5 of Q15
Kafka - with Java/Python
If a Kafka consumer has enable.auto.commit set to false, what is the expected behavior?
AOffsets are committed automatically after each poll
BConsumer commits offsets twice per poll
COffsets must be committed manually by the consumer
DConsumer will not receive any messages
Step-by-Step Solution
Solution:
  1. Step 1: Understand 'enable.auto.commit' setting

    When false, Kafka does not commit offsets automatically.
  2. Step 2: Determine offset commit responsibility

    The consumer must manually commit offsets to track progress.
  3. Final Answer:

    Offsets must be committed manually by the consumer -> Option C
  4. Quick Check:

    enable.auto.commit=false means manual commit [OK]
Quick Trick: Disable auto commit to control offset commits manually [OK]
Common Mistakes:
MISTAKES
  • Assuming offsets commit automatically when disabled
  • Thinking consumer stops receiving messages
  • Believing offsets commit twice per poll

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes