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 latest version available is 2.37.0-rc, which can be found in the reference documentation for \u003ccode\u003estructgoogle::cloud::pubsub::PullResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis page provides version-specific documentation for \u003ccode\u003ePullResponse\u003c/code\u003e, ranging from version 2.11.0 up to the latest release candidate.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePullResponse\u003c/code\u003e relates to the response received during a blocking pull operation.\u003c/p\u003e\n"],["\u003cp\u003eMessage redelivery will occur if the application invokes \u003ccode\u003ehandler.nack()\u003c/code\u003e or allows the handler to go out of scope.\u003c/p\u003e\n"],["\u003cp\u003eThe behavior of message redelivery after a successful \u003ccode\u003ehandler.ack()\u003c/code\u003e depends on whether the subscription uses exactly-once delivery or best-effort delivery, with best-effort potentially redelivering even after acknowledgement.\u003c/p\u003e\n"]]],[],null,[]]