Bird
0
0

A developer set maxDeliveryAttempts to 0 in a subscription with a dead letter topic. What is the expected behavior?

medium📝 Debug Q7 of 15
GCP - Cloud Pub/Sub
A developer set maxDeliveryAttempts to 0 in a subscription with a dead letter topic. What is the expected behavior?
AThe subscription will fail to create due to invalid maxDeliveryAttempts.
BMessages will be sent to the dead letter topic immediately after first failure.
CMessages will be retried indefinitely without dead lettering.
DMessages will never be sent to the dead letter topic.
Step-by-Step Solution
Solution:
  1. Step 1: Understand valid maxDeliveryAttempts values

    maxDeliveryAttempts must be a positive integer greater than zero.
  2. Step 2: Consequence of invalid value

    Setting it to 0 is invalid and causes subscription creation failure.
  3. Final Answer:

    The subscription will fail to create due to invalid maxDeliveryAttempts. -> Option A
  4. Quick Check:

    maxDeliveryAttempts must be > 0 or subscription fails [OK]
Quick Trick: maxDeliveryAttempts must be positive integer [OK]
Common Mistakes:
  • Assuming 0 means immediate dead lettering
  • Thinking 0 means infinite retries
  • Ignoring validation errors on subscription creation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes