
Answer-first summary for fast verification
Answer: Modify the topic retention policy to keep messages for 30 days.
The correct approach is **D. Modify the topic retention policy to keep messages for 30 days.** This ensures that Pub/Sub retains messages in the topic for the specified duration, allowing any new subscriber to access the last 30 days of data without manual intervention. This method is scalable and efficient, eliminating the need for data republishing or manual data resending. - **Option A** is impractical because it involves manual data resending, which is error-prone and inefficient, especially with large data volumes. - **Option B** lacks scalability, as it requires manual republishing of data for each new subscriber, leading to potential inconsistencies. - **Option C** is incorrect because the subscriber retention policy does not affect message retention in the topic; it only controls how long a subscription is retained in Pub/Sub.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In your role at a large ecommerce company, you're using Pub/Sub to ingest clickstream data into Google Cloud for analytics. You've observed that new subscribers to an existing topic cannot access older data. With a major yearly sale event approaching in two months, you need a solution that ensures any new subscriber can access the last 30 days of data once implemented. What should you do to address this issue?
A
Request the source system to resend the data to Pub/Sub and subscribe to it.
B
Establish a new topic and republish the last 30 days of data whenever a new subscriber connects to the existing topic.
C
Adjust the subscriber retention policy to retain data for 30 days.
D
Modify the topic retention policy to keep messages for 30 days.
No comments yet.