
Answer-first summary for fast verification
Answer: Use exponential backoff as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
Option D is the correct answer. Using exponential backoff as the subscription retry policy helps to gradually increase the delay between retries, which prevents overloading the consumer app. Configuring dead lettering to a different topic ensures that messages which cannot be processed after the maximum delivery attempts (10 in this case) are stored separately. This setup allows for effective message retry management and prevents the main message flow from being interrupted by failed messages.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are tasked with designing a messaging system using Google Cloud Pub/Sub to process clickstream data. The system incorporates an event-driven consumer application that operates using a push subscription. To account for potential temporary downtime of the consumer application, you need to ensure that the messaging system is robust and reliable. Additionally, the system must store incoming messages that are not immediately consumable by the subscriber. It should also implement a retry mechanism for failed messages, with retries spaced out to prevent overloading the consumer application. After a maximum of 10 retries, any failed messages should be stored in a designated topic. How should you configure the Pub/Sub subscription to meet these requirements?
A
Increase the acknowledgement deadline to 10 minutes.
B
Use immediate redelivery as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
C
Use exponential backoff as the subscription retry policy, and configure dead lettering to the same source topic with maximum delivery attempts set to 10.
D
Use exponential backoff as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
No comments yet.