Professional Data Engineer Exam QuestionsBrowse all questions from this exam

Professional Data Engineer Exam - Question 228


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.)

Show Answer
Correct Answer: BE

To update the streaming pipeline while ensuring the reprocessing of the previous two days of delivered Pub/Sub messages, you should use Pub/Sub Snapshot to capture the state of the subscription two days before the deployment. This helps in taking a point-in-time snapshot of the messages. After deploying the updated pipeline, you can use Pub/Sub Seek with a timestamp that corresponds to two days before the deployment to replay messages from that point onward. This method ensures that the pipeline reprocesses the messages from the desired time frame.

Discussion

12 comments
Sign in to comment
tibuenocOption: D
Jan 18, 2024

DE Another way to replay messages that have been acknowledged is to seek to a timestamp. To seek to a timestamp, you must first configure the subscription to retain acknowledged messages using retain-acked-messages. If retain-acked-messages is set, Pub/Sub retains acknowledged messages for 7 days. You only need to do this step if you intend to seek to a timestamp, not to a snapshot. https://cloud.google.com/pubsub/docs/replay-message

joao_01
Apr 18, 2024

Its BE. By the way, you can seek to a snapshot yes: "Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided in the request" Link:https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/seek

GCP001Option: B
Jan 18, 2024

B and E, already tested at cloud console.

task_7Option: D
Jan 10, 2024

DE Set the retain-acked-messages flag to true for the subscription. This instructs Pub/Sub to store acknowledged messages for a specified retention period. E Use Pub/Sub Seek with a timestamp. After deploying the updated pipeline, use the Seek feature to replay messages. Specify a timestamp that's two days before the current time. This rewinds the subscription's message cursor, making it redeliver messages from that point onward.

raaadOption: B
Jan 4, 2024

- Pub/Sub Snapshots allow you to capture the state of a subscription's unacknowledged messages at a particular point in time. - By creating a snapshot two days before deploying the updated pipeline, you can later use this snapshot to replay the messages from that point. ============= Option E: - Pub/Sub Seek allows us to alter the acknowledgment state of messages in bulk. - So we can rewind a subscription to a point in time or a snapshot. - Using Seek with a timestamp corresponding to two days ago would allow the updated pipeline to reprocess messages from that time.

datapassionate
Jan 15, 2024

Creating a snapshot of the Pub/Sub subscription two days before the deployment captures the state of unacknowledged messages at that particular point in time, which would include messages from before those two days. If our objective is to reprocess the data from the last two days specifically, then capturing a snapshot two days prior wouldn't directly address this need.

datapassionate
Jan 15, 2024

This case is described here. https://cloud.google.com/pubsub/docs/replay-message And according to this D &E would be correct.

datapassionate
Jan 15, 2024

nother way to replay messages that have been acknowledged is to seek to a timestamp. To seek to a timestamp, you must first configure the subscription to retain acknowledged messages using retain-acked-messages. If retain-acked-messages is set, Pub/Sub retains acknowledged messages for 7 days.

e70ea9eOption: B
Dec 30, 2023

BE--> correct Pub/Sub Snapshot: Captures a point-in-time snapshot of the messages in the subscription, ensuring that the previous two days of messages are available for reprocessing even after they've been acknowledged. Retain-Acked-Messages Flag: While this flag prevents acknowledged messages from being deleted, it's not sufficient on its own because it only retains messages going forward from when it's enabled.

Matt_108Option: D
Jan 13, 2024

Option D and E

Sofiia98Option: B
Jan 15, 2024

BE https://cloud.google.com/pubsub/docs/replay-overview

tibuenoc
Jan 18, 2024

But There is a problem snapshot you shoudl seek by subscriptions not by timestamp

ML6Option: E
Feb 16, 2024

B and E: The seek feature extends subscriber capabilities by allowing you to alter the acknowledgement state of messages in bulk. For example, you can replay previously acknowledged messages or purge messages in bulk. In addition, you can copy the acknowledgement state of one subscription to another by using seek in combination with a snapshot. Source: https://cloud.google.com/pubsub/docs/replay-overview

TryolabsOption: E
Feb 26, 2024

D and E, https://cloud.google.com/pubsub/docs/replay-message

cuadradobertolinisebastiancamiOption: D
Feb 26, 2024

E for sure, you need to seek from a timestamp. To accomplish to that you need to "Set the retain-acked-messages flag to true for the subscription." From google documentation: "Note: To seek to a previous time point, your subscription must be configured to retain acknowledged messages. You can change this setting by clicking Edit on the subscription details page, and checking the box for Retain acknowledged messages." https://cloud.google.com/pubsub/docs/replay-message

virat_kohliOption: D
May 20, 2024

D. Use the Pub/Sub subscription retain-acked-messages flag. E. Use Pub/Sub Seek with a timestamp.

Anudeep58Option: E
Jun 6, 2024

BE B. Use Pub/Sub Snapshot capture two days before the deployment. Pub/Sub Snapshot: Creating a snapshot captures the state of the subscription at a specific point in time. You can then seek to this snapshot to replay messages from that point onwards. By capturing a snapshot two days before the deployment, you can ensure that your pipeline reprocesses messages from the past two days. E. Use Pub/Sub Seek with a timestamp. Pub/Sub Seek: This feature allows you to reset the subscription to a specific timestamp. Messages published to the topic after this timestamp are re-delivered. By seeking to the timestamp from two days ago, you can instruct Pub/Sub to start re-delivering messages from that point in time