Bird
0
0

You wrote code where a Kafka consumer tries to read from a topic but gets no messages. What is a likely cause?

medium📝 Debug Q14 of 15
Kafka - Basics and Event Streaming
You wrote code where a Kafka consumer tries to read from a topic but gets no messages. What is a likely cause?
AThe consumer is subscribed to the wrong topic name
BKafka does not support consumers
CMessages are deleted immediately after sending
DProducer sends messages in the wrong format
Step-by-Step Solution
Solution:
  1. Step 1: Check consumer subscription

    If the consumer subscribes to a wrong or misspelled topic, it won't receive messages.
  2. Step 2: Evaluate other options

    Kafka supports consumers, messages are not deleted immediately, and format issues usually cause errors, not empty reads.
  3. Final Answer:

    The consumer is subscribed to the wrong topic name -> Option A
  4. Quick Check:

    Wrong topic subscription = no messages [OK]
Quick Trick: Check topic name spelling for consumer subscription [OK]
Common Mistakes:
  • Assuming Kafka lacks consumer support
  • Thinking messages vanish instantly
  • Blaming message format without error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes