Bird
0
0

If a Kafka consumer reads messages from a topic faster than the producer sends them, what is the expected behavior?

medium📝 Predict Output Q5 of 15
Kafka - Basics and Event Streaming
If a Kafka consumer reads messages from a topic faster than the producer sends them, what is the expected behavior?
AMessages get lost in the topic
BConsumer crashes due to no messages
CProducer slows down automatically
DConsumer waits for new messages without errors
Step-by-Step Solution
Solution:
  1. Step 1: Understand consumer-producer speed difference

    If consumer is faster, it simply waits for new messages to arrive.
  2. Step 2: Check Kafka's behavior on empty reads

    Kafka consumers block or poll until messages arrive; no crash or loss occurs.
  3. Final Answer:

    Consumer waits for new messages without errors -> Option D
  4. Quick Check:

    Consumer faster than producer = Waits safely [OK]
Quick Trick: Consumers wait patiently if no new messages arrive [OK]
Common Mistakes:
  • Thinking consumer crashes on no data
  • Assuming producer slows down automatically
  • Believing messages get lost

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes