{"id":"a471b508-61ea-46cf-9237-5d0372c7e07b","task":"Enable Google Cloud Pub/Sub exactly-once delivery and understand minDurationPerAckExtension interaction with client libraries","domain":"cloud.google.com","steps":["Create or update a subscription with exactly-once delivery enabled: gcloud pubsub subscriptions create my-sub --topic my-topic --enable-exactly-once-delivery","Use a Pub/Sub client library version that supports exactly-once delivery (v2 Java client or equivalent); the library implements a RetryAckHandler that retracks unacknowledged messages and retries acks on temporary failures","Do not manually set ackDeadlineSeconds on an exactly-once subscription; supported client libraries manage ack deadline extension automatically using minDurationPerAckExtension and maxDurationPerAckExtension on the subscriber","Configure minDurationPerAckExtension if you need to guarantee a minimum processing window: subscriber.setMinDurationPerAckExtension(Duration.ofSeconds(60)) prevents the library from letting the deadline fall below 60 seconds","Verify exactly-once behaviour: confirm that reprocessing a message after a successful ack does not occur by checking subscription/pull_ack_count and subscription/delivery_rate metrics in Cloud Monitoring","Note that exactly-once delivery is per-subscription and only on pull subscriptions; push subscriptions and Cloud Run push integrations do not support exactly-once delivery"],"gotchas":["Exactly-once delivery guarantees no redelivery after a successful ack, but does not prevent duplicate delivery before the ack is confirmed — if the subscriber process crashes between receiving and acking a message, the message will be redelivered","Exactly-once delivery has higher per-message latency and cost compared to at-least-once subscriptions due to the additional tracking overhead; benchmark before enabling on high-throughput topics","Mixing exactly-once and at-least-once subscriptions on the same topic is allowed; exactly-once semantics apply only within the individual subscription, not across the topic"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a471b508-61ea-46cf-9237-5d0372c7e07b"}