Before deploying updated Pub/Sub subscriber code that might incorrectly acknowledge messages and you do not retain acknowledged messages, how can you recover messages if deployment causes message loss?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a Pub/Sub snapshot before deploying the new subscriber code, and use a Seek operation to re-deliver messages that became available after the snapshot was created..
Why this is the answer
Creating a Pub/Sub snapshot before deployment is the most robust way to recover messages if the new subscriber code causes message loss due to incorrect acknowledgments. A snapshot retains a copy of all messages in the topic's backlog at the time of creation. If messages are lost, you can use a Seek operation on the subscription, referencing the snapshot, to re-deliver all messages that were in the topic's backlog when the snapshot was taken, including those that might have been incorrectly acknowledged. The Pub/Sub emulator is for local testing, not production recovery. Cloud Build logs timestamps but doesn't provide a mechanism to recover lost Pub/Sub messages directly. Dead-lettering captures messages that a subscriber fails to acknowledge, not messages that are incorrectly acknowledged and thus removed from the topic.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed