Bird
Raised Fist0

Why might consumer lag sometimes show zero even when consumers are not processing messages?

hard🧠 Conceptual Q10 of Q15
Kafka - Monitoring and Operations
Why might consumer lag sometimes show zero even when consumers are not processing messages?
ABecause the topic has only one partition
BBecause lag is calculated based on committed offsets, and consumers may not commit offsets immediately
CBecause Kafka automatically resets lag to zero every hour
DBecause the consumer group ID is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Understand lag calculation

    Lag is the difference between the latest offset and the last committed offset by the consumer group.
  2. Step 2: Explain zero lag with no processing

    If consumers do not commit offsets frequently, lag may appear zero even if messages are unprocessed.
  3. Final Answer:

    Because lag is calculated based on committed offsets, and consumers may not commit offsets immediately -> Option B
  4. Quick Check:

    Lag zero can hide uncommitted processing [OK]
Quick Trick: Lag depends on committed offsets, not real-time processing [OK]
Common Mistakes:
MISTAKES
  • Believing Kafka resets lag periodically
  • Thinking partition count affects lag zero
  • Assuming invalid group ID causes zero lag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes