New subscribers to an existing Pub/Sub topic cannot read older messages. You must ensure any new subscriber can read the last 30 days of messages. What do you change?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the Pub/Sub topic retention policy to 30 days..
Why this is the answer
The correct solution is to set the Pub/Sub topic retention policy to 30 days. By default, Pub/Sub messages are deleted from the topic as soon as they are acknowledged by all subscriptions. Setting a topic retention policy ensures that messages are retained on the topic for the specified duration, regardless of subscription acknowledgment status. This allows new subscribers to access historical messages within that retention window. Creating a new topic and republishing messages is inefficient and complex to manage, especially for frequent new subscribers. Setting a subscriber retention policy is not a Pub/Sub feature; retention is managed at the topic level. Asking the source system to re-push data is also inefficient and places an unnecessary burden on the source, which may not be feasible or scalable.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed