Bird
0
0

In an Amazon MSK cluster, if you configure a consumer group with auto.offset.reset set to "earliest" and start consuming from a new topic, what will be the first message consumed?

medium📝 Predict Output Q5 of 15
Kafka - Kubernetes and Cloud Deployment
In an Amazon MSK cluster, if you configure a consumer group with auto.offset.reset set to "earliest" and start consuming from a new topic, what will be the first message consumed?
AAn error will occur due to missing offsets
BThe oldest message in the topic
CNo messages will be consumed
DThe newest message produced after consumer start
Step-by-Step Solution
Solution:
  1. Step 1: Understand auto.offset.reset behavior

    Setting "earliest" means the consumer starts reading from the oldest available message if no committed offset exists.
  2. Step 2: Apply to new topic scenario

    Since the topic is new and no offsets exist, the consumer reads from the oldest message.
  3. Final Answer:

    The oldest message in the topic -> Option B
  4. Quick Check:

    auto.offset.reset=earliest means read oldest message [OK]
Quick Trick: earliest reads from oldest message if no offset [OK]
Common Mistakes:
MISTAKES
  • Confusing earliest with latest
  • Expecting no messages on new topic
  • Assuming error on missing offsets

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes