GCP - Cloud Pub/SubA 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.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand valid maxDeliveryAttempts valuesmaxDeliveryAttempts must be a positive integer greater than zero.Step 2: Consequence of invalid valueSetting it to 0 is invalid and causes subscription creation failure.Final Answer:The subscription will fail to create due to invalid maxDeliveryAttempts. -> Option AQuick Check:maxDeliveryAttempts must be > 0 or subscription fails [OK]Quick Trick: maxDeliveryAttempts must be positive integer [OK]Common Mistakes:Assuming 0 means immediate dead letteringThinking 0 means infinite retriesIgnoring validation errors on subscription creation
Master "Cloud Pub/Sub" in GCP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More GCP Quizzes Cloud Firestore and Bigtable - Bigtable schema design - Quiz 14medium Cloud Functions - Concurrency and scaling - Quiz 11easy Cloud Functions - Environment variables and secrets - Quiz 5medium Cloud IAM Advanced - Audit logging - Quiz 10hard Cloud Load Balancing - SSL certificates management - Quiz 9hard Cloud Monitoring and Logging - Alerting policies - Quiz 11easy Cloud Monitoring and Logging - Cloud Trace for latency analysis - Quiz 1easy Cloud Run - Cloud Run service concept - Quiz 5medium Cloud SQL and Databases - Backup and restore - Quiz 15hard Cloud SQL and Databases - High availability configuration - Quiz 6medium