nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #372

You are designing a messaging system by using Pub/Sub to process clickstream data with an event-driven consumer app that relies on a push subscription. You need to configure the messaging system…

The correct answer is D. 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 satisfies all three requirements simultaneously: exponential backoff retries messages with increasing delays, which prevents thundering-herd overload on a recovering consumer app; dead lettering routes undeliverable messages to a separate topic after 10 attempts…

Submitted by andres_qro· Mar 30, 2026Designing data processing systems

Question

You are designing a messaging system by using Pub/Sub to process clickstream data with an event-driven consumer app that relies on a push subscription. You need to configure the messaging system that is reliable enough to handle temporary downtime of the consumer app. You also need the messaging system to store the input messages that cannot be consumed by the subscriber. The system needs to retry failed messages gradually, avoiding overloading the consumer app, and store the failed messages after a maximum of 10 retries in a topic. How should you configure the Pub/Sub subscription?

Options

  • AIncrease the acknowledgement deadline to 10 minutes.
  • BUse immediate redelivery as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
  • CUse exponential backoff as the subscription retry policy, and configure dead lettering to the same source topic with maximum delivery attempts set to 10.
  • DUse exponential backoff as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.

How the community answered

(41 responses)
  • A
    7% (3)
  • B
    15% (6)
  • C
    2% (1)
  • D
    76% (31)

Explanation

Option D satisfies all three requirements simultaneously: exponential backoff retries messages with increasing delays, which prevents thundering-herd overload on a recovering consumer app; dead lettering routes undeliverable messages to a separate topic after 10 attempts, giving you a durable store for inspection without polluting the source.

A is wrong because extending the acknowledgement deadline only delays redelivery timing - it adds no retry policy, no dead lettering, and no protection against overload.

B is wrong because immediate redelivery is the opposite of "gradual" - it hammers a struggling consumer at full speed, directly violating the overload-avoidance requirement.

C is wrong on a subtle but critical point: dead lettering to the same source topic creates an infinite loop - failed messages land back in the source, get picked up, fail again, and cycle forever, making the "10 retry max" meaningless.

Memory tip: The two key words are "gradual" (→ exponential backoff, never immediate) and "store in a topic" (→ dead letter to a different topic, never the source). If either of those is wrong in a choice, eliminate it immediately.

Topics

#Pub/Sub#Subscription Retry Policy#Dead Letter Queues#Messaging System Design

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice