Bird
0
0

A Kafka consumer is subscribed to a topic but receives no messages. Which is the most probable cause?

medium📝 Debug Q7 of 15
Kafka - Basics and Event Streaming
A Kafka consumer is subscribed to a topic but receives no messages. Which is the most probable cause?
AThe topic has too many partitions for the consumer to handle
BThe consumer group ID is not set, so Kafka treats it as a new group with no committed offsets
CThe producer is sending messages with keys that do not match the consumer's filter
DThe Kafka broker is configured to reject consumer connections
Step-by-Step Solution
Solution:
  1. Step 1: Check consumer group configuration

    If a consumer group ID is missing, Kafka treats the consumer as new and may start reading from the end, resulting in no messages.
  2. Step 2: Evaluate other options

    Too many partitions won't block messages; key filtering is not a default consumer feature; broker rejecting connections would cause errors, not silent no messages.
  3. Final Answer:

    The consumer group ID is not set, so Kafka treats it as a new group with no committed offsets -> Option B
  4. Quick Check:

    Missing group ID causes no committed offsets, so no messages [OK]
Quick Trick: Always set consumer group ID to receive messages [OK]
Common Mistakes:
  • Assuming too many partitions block consumption
  • Believing message keys filter consumer messages by default
  • Thinking broker rejects connections silently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes