Google Certified Professional Data Engineer

Sign Up Free or Log In to participate!

Seeking and Snapshot in Pub/Sub Subscription?

What is the difference between Seeking and Snapshot in Pub/Sub Subscription?

1 Answers

Seeking and Snapshots aren’t directly comparable – one is (sometimes) used as part of the other 🙂

Seeking is basically a way to alter the state of acknowledgement of messages in bulk. For example, you can seek to a timestamp in the past, and all messages received after that time will be marked as unacknowledged. Seeking can also be used to purge a queue, by seeking to a time in the future.

Snapshots are used in seeking as an alternative to a timestamp. You need to create a snapshot at a point in time, and that snapshot will retain all messages that were unacknowledged at the point of the snapshot’s creation, as well as any messages published to the topic thereafter. Unlike timestamps, you don’t need to configure any special topic configuration to use snapshots (like retain_acked_messages). Snapshots are particularly useful when rolling out application updates, so if you roll back a change you can also "roll-back" your topic to a snapshot.

For more info see:

Hope this helps!


Hi Tim , Thanks for the answer. In case of seeking we can seek in the past, but in case of Snapshot i am confused.


In case of Snapshot, do we create at any moment in present or we can create a snapshot in the past?

Tim Berry

Snapshots are created in the present moment, to snapshot a moment in time. You can’t create a snapshot in the past, but you can seek to a point in the past with a timestamp.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?