Bird
0
0

You have set a message retention duration of 7 days on your Pub/Sub subscription. However, messages are disappearing after 1 day. What is the most likely cause?

medium📝 Debug Q14 of 15
GCP - Cloud Pub/Sub
You have set a message retention duration of 7 days on your Pub/Sub subscription. However, messages are disappearing after 1 day. What is the most likely cause?
AMessages are being acknowledged by the subscriber before 1 day.
BThe retention duration setting is ignored by Pub/Sub.
CThe subscription is a push type and does not support retention.
DMessages are automatically deleted after 24 hours regardless of settings.
Step-by-Step Solution
Solution:
  1. Step 1: Check retention vs acknowledgment

    Retention controls how long unacknowledged messages stay. If messages are acknowledged, they are removed immediately.
  2. Step 2: Analyze disappearance cause

    If messages disappear early, likely they were acknowledged by the subscriber before 1 day.
  3. Final Answer:

    Messages are being acknowledged by the subscriber before 1 day. -> Option A
  4. Quick Check:

    Acknowledged messages removed before retention ends [OK]
Quick Trick: Acknowledged messages delete immediately, ignoring retention [OK]
Common Mistakes:
  • Assuming retention is ignored by Pub/Sub
  • Believing push subscriptions don't support retention
  • Thinking messages auto-delete after 24 hours always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes