PROFESSIONAL-DATA-ENGINEER · Question #310
You have a streaming pipeline that ingests data from Pub/Sub in production. You need to update this streaming pipeline with improved business logic. You need to ensure that the updated pipeline…
To replay previously delivered Pub/Sub messages, you must ensure message retention is active and then use Seek to rewind the subscription's cursor to the desired timestamp.
Question
Options
- AUse the Pub/Sub subscription clear-retry-policy flag
- BUse Pub/Sub Snapshot capture two days before the deployment.
- CCreate a new Pub/Sub subscription two days before the deployment.
- DUse the Pub/Sub subscription retain-acked-messages flag.
- EUse Pub/Sub Seek with a timestamp.
Why each option
To replay previously delivered Pub/Sub messages, you must ensure message retention is active and then use Seek to rewind the subscription's cursor to the desired timestamp.
There is no clear-retry-policy flag in Pub/Sub; this is not a valid mechanism for replaying past messages.
A snapshot taken two days before deployment would not be available retroactively; snapshots must be created in advance and are only useful if already captured.
The retain-acked-messages flag must be enabled before messages are acknowledged; setting it after the fact does not restore already-expired retained messages.
Concept tested: Pub/Sub message replay using Seek and subscription management
Source: https://cloud.google.com/pubsub/docs/replay-overview
Topics
Community Discussion
No community discussion yet for this question.