If the application invokes handler.nack() or allows handler to go out of scope, then the service will redeliver the message.
With exactly-once delivery subscriptions, the service will stop redelivering the message once the application invokes handler.ack() and the invocation succeeds. With best-efforts subscriptions, the service may redeliver the message, even after a successful handler.ack() invocation.
If handler is not an rvalue, you may need to use std::move(handler).ack() or std::move(handler).nack().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe webpage provides a reference for \u003ccode\u003ePullResponse\u003c/code\u003e within the Google Cloud Pub/Sub C++ library.\u003c/p\u003e\n"],["\u003cp\u003eVersion 2.37.0-rc is the latest release candidate, while version 2.18.0 is the current version displayed and versions back to 2.11.0 are also listed.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation details how message acknowledgement and negative acknowledgement (ack/nack) within the \u003ccode\u003ehandler\u003c/code\u003e impacts message redelivery.\u003c/p\u003e\n"],["\u003cp\u003eExactly-once delivery subscriptions stop redelivering a message after a successful \u003ccode\u003ehandler.ack()\u003c/code\u003e invocation, whereas best-efforts subscriptions may redeliver even after a successful acknowledgement.\u003c/p\u003e\n"],["\u003cp\u003eIt is important to note that you might need to use \u003ccode\u003estd::move(handler).ack()\u003c/code\u003e or \u003ccode\u003estd::move(handler).nack()\u003c/code\u003e if the \u003ccode\u003ehandler\u003c/code\u003e is not an rvalue.\u003c/p\u003e\n"]]],[],null,[]]