Google Cloud Professional Data Engineer — Question 154
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 reprocesses the previous two days of delivered Pub/Sub messages. What should you do? (Choose two.)
Answer options
- A. Use the Pub/Sub subscription clear-retry-policy flag
- B. Use Pub/Sub Snapshot capture two days before the deployment.
- C. Create a new Pub/Sub subscription two days before the deployment.
- D. Use the Pub/Sub subscription retain-acked-messages flag.
- E. Use Pub/Sub Seek with a timestamp.
Correct answer: D
Explanation
The correct answer is D because enabling the retain-acked-messages flag allows you to keep acknowledged messages for a certain duration, which is critical for reprocessing. Option A is incorrect as the clear-retry-policy flag does not help with message retention. Option B's Snapshot is useful but does not directly address the need to retain messages. Option C creates a new subscription but does not facilitate access to past messages. Option E allows seeking to a timestamp but doesn't ensure retention of acknowledged messages.