Acknowledgements let Pub/Sub know whether a delivered message was processed successfully. If Pub/Sub doesn’t receive an ack, it will assume the message failed and will re-deliver it. Design your subscribers to handle at-least-once delivery semantics.
Message lifecycle and where acknowledgements fit
- A topic is created and publishers send messages to it.
- A subscription is created for the topic; subscribers either pull messages or receive pushed messages from the subscription.
- Pub/Sub delivers a message to the subscriber (push or pull).
- The subscriber must acknowledge the message to signal successful processing.
- If Pub/Sub does not receive an ack before the ack deadline expires, or if the subscriber explicitly nacks the message, the message becomes eligible for redelivery.
Key implementation details
Acknowledgement types and behaviors

Practical examples (Python client library)
Synchronous pull: explicitly acknowledge messagesNotes on system design and subscriber behavior
- Subscriber processing times vary. For short, predictable tasks, short ack deadlines may suffice. For long-running tasks, extend the ack deadline per message or increase the subscription default.
- At-least-once delivery requires idempotency or deduplication. If your processing can’t be made idempotent, use dedupe strategies (unique message IDs, external dedupe stores, etc.).
- For push endpoints, only return HTTP 2xx when processing actually succeeded. Returning 2xx will stop retries and is treated as an acknowledgement by Pub/Sub.
- Use
modifyAckDeadline()responsibly to avoid holding messages indefinitely and to ensure fair redelivery behavior.
Be careful with auto-ack behavior. If messages are auto-acknowledged before processing completes (or if a push endpoint returns 2xx while processing actually failed), you may lose the ability to retry and risk data loss or missed processing.
Quick exam pointers
- Pub/Sub uses ack IDs and ack deadlines to manage delivery and retries.
- The typical exam concept is “at-least-once delivery”: messages may be delivered more than once unless you implement deduplication or enable exactly-once features where supported.