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 documentation for various versions of the \u003ccode\u003ePullResponse\u003c/code\u003e structure in the Google Cloud Pub/Sub C++ library, ranging from version 2.11.0 to the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePullResponse\u003c/code\u003e structure is used to handle the response from a blocking pull operation in Pub/Sub.\u003c/p\u003e\n"],["\u003cp\u003eThe message redelivery behavior depends on whether the subscription is configured for exactly-once delivery or best-efforts delivery, as exactly-once subscriptions stop redelivery upon successful acknowledgment, while best-efforts subscriptions may still redeliver.\u003c/p\u003e\n"],["\u003cp\u003eAcknowledging or negatively acknowledging a message is done via \u003ccode\u003ehandler.ack()\u003c/code\u003e or \u003ccode\u003ehandler.nack()\u003c/code\u003e respectively, and if \u003ccode\u003ehandler\u003c/code\u003e is not an rvalue then \u003ccode\u003estd::move(handler).ack()\u003c/code\u003e or \u003ccode\u003estd::move(handler).nack()\u003c/code\u003e may be needed.\u003c/p\u003e\n"],["\u003cp\u003eThe webpage is giving documentation related to the struct \u003ccode\u003egoogle::cloud::pubsub::PullResponse\u003c/code\u003e which pertains to the Google Cloud Pub/Sub C++ library.\u003c/p\u003e\n"]]],[],null,[]]