A logistics platform's order-events consumer must be offline for a two-day database migration. Events published during the outage still need processing afterward, and the producers cannot be changed. What should the team do?
Show answer and explanation
Answer: B
Pub/Sub keeps a message in a subscription until a subscriber acknowledges it or the subscription's message retention period ends. If the consumer stops acknowledging during the migration, the backlog accumulates and processing resumes from the oldest unacknowledged message after restart. The retention period must cover the full outage, so it should be set longer than two days. Deleting the subscription discards its backlog, a dead-letter topic only receives messages after repeated failed deliveries, and stopping the publishers would halt business events upstream.
Why the other options are wrong
- A. Deleting the subscription discards every message it was holding, so the outage backlog is lost rather than preserved for later processing.
- C. Dead-letter topics receive a message only after it exceeds the maximum delivery attempts on a subscription, so they are not a way to pause consumption during an outage.
- D. Halting the publishers stops business events upstream, which is far worse than delaying consumption, and it does not preserve a backlog for the consumer.