Google Cloud Professional Data Engineer — Question 212

You work for a large ecommerce company. You are using Pub/Sub to ingest the clickstream data to Google Cloud for analytics. You observe that when a new subscriber connects to an existing topic to analyze data, they are unable to subscribe to older data. For an upcoming yearly sale event in two months, you need a solution that, once implemented, will enable any new subscriber to read the last 30 days of data. What should you do?

Answer options

Correct answer: B

Explanation

The correct answer is B because adjusting the topic retention policy allows the topic to retain messages for 30 days, enabling any new subscriber to access the last month's data. The other options are ineffective; creating a new topic (A) does not solve the problem, modifying the subscriber retention policy (C) does not impact the data availability in the topic, and re-pushing data (D) is not a feasible or efficient solution.