Bird
0
0

Given this subscription config snippet:

medium📝 Predict Output Q13 of 15
GCP - Cloud Pub/Sub
Given this subscription config snippet:
{
  "dead_letter_policy": {
    "dead_letter_topic": "projects/myproj/topics/dlt",
    "max_delivery_attempts": 5
  }
}

What happens when a message fails delivery 6 times?
AThe message is retried indefinitely
BThe message is sent to the dead letter topic
CThe message is deleted immediately
DThe message is sent back to the main topic
Step-by-Step Solution
Solution:
  1. Step 1: Understand max_delivery_attempts meaning

    Messages are retried up to the max_delivery_attempts count before moving to dead letter topic.
  2. Step 2: Apply max_delivery_attempts = 5

    After 5 failed attempts, the 6th failure triggers sending the message to the dead letter topic.
  3. Final Answer:

    The message is sent to the dead letter topic -> Option B
  4. Quick Check:

    Failures > max_delivery_attempts = dead letter send [OK]
Quick Trick: Messages move to dead letter after max attempts exceeded [OK]
Common Mistakes:
  • Thinking messages retry forever
  • Assuming immediate deletion on failure
  • Believing message returns to main topic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes