Professional Cloud Developer free question 2 / 10 · Domain 1: Designing highly scalable, secure, and reliable cloud-native applications
A subscription has a backlog in which the oldest unacknowledged message is 2 days old. An engineer creates a snapshot of it now. When does the snapshot expire?
- After 7 days, as a snapshot is kept for the maximum lifetime, unrelated to the backlog
- After 2 days, as a snapshot expires when the oldest message in the backlog would reach the retention limit
- It does not expire, as a snapshot lasts until someone deletes it explicitly
- After 5 days, as the lifetime is 7 days minus the age of the oldest unacknowledged message
Show the answer and explanation
Answer: D
Why this is correct
A snapshot is a point-in-time view of the acknowledgment state of a subscription, and its lifetime follows the existing backlog: 7 days minus the age of the oldest unacknowledged message. With a 2-day-old oldest message the snapshot expires after 5 days. The page's own example is a 1-day-old message, which gives 6 days. The maximum lifetime is seven days, and a snapshot that would expire in less than 1 hour cannot be created.
Why the other options are wrong
"After 7 days, as a snapshot is kept for the maximum lifetime, unrelated to the backlog" … The maximum possible lifetime is seven days, but it is shortened by the age of the oldest unacknowledged message in the subscription.
"After 2 days, as a snapshot expires when the oldest message in the backlog would reach the retention limit" … The lifetime is 7 days minus the age, not the age itself. A backlog with a 1-day-old message gives a snapshot that expires after 6 days.
"It does not expire, as a snapshot lasts until someone deletes it explicitly" … A snapshot has a lifetime, and the page gives the rule that sets it. This timeline is needed so that snapshots can offer a strong at-least-once delivery guarantee.
Key point
The older the backlog, the shorter the snapshot lives. Use a snapshot promptly before a risky deployment, not as a long-term archive.