GCP Associate Cloud Engineer Practice Question 97: Pub/Sub Seek Replay Retention
Google Cloud Associate Cloud Engineer · Test 10 · question 7 of 10
A subscriber application consumed and acknowledged a batch of Pub/Sub messages, but a downstream bug means those messages need to be reprocessed. You want to seek the subscription back to a timestamp from three hours ago so the acknowledged messages are redelivered, and you have not changed any settings on the subscription since it was created with default options.
What must be true for this seek operation to redeliver the already-acknowledged messages?
Show answer and explanation
Answer:
By default, Pub/Sub discards a message once it is acknowledged. To seek backward in time and redeliver messages that were already acknowledged, the subscription must have the "retain acknowledged messages" property enabled, and the message retention duration must be long enough to still hold messages from the target timestamp. Without that setting, an acknowledged message is gone and seeking to a timestamp before it was deleted cannot bring it back.
Option A is wrong because seek operates per subscription; the number of subscriptions on a topic is not a factor in whether seek works. Option C is wrong because seek works with both pull and push subscriptions; the delivery mechanism does not gate the ability to seek. Option D is wrong because a dead-letter topic handles messages that repeatedly fail delivery attempts; it has no role in replaying already-acknowledged messages via seek.
Reference: Replay and purge messages with seek