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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-14 UTC."],[[["This webpage provides documentation for various versions of the Google Cloud Pub/Sub C++ client library, detailing the `PullResponse` structure."],["The most recent version is `2.37.0-rc`, while the oldest documented version listed is `2.11.0`, with numerous versions in between."],["The `PullResponse` documentation explains the behavior of message handling, including acknowledging (`ack`) and negatively acknowledging (`nack`) messages."],["The content outlines the difference in message redelivery behavior between exactly-once delivery subscriptions and best-efforts subscriptions."],["The documentation mentions the use of `std::move(handler)` for invoking `ack()` or `nack()` when the `handler` is not an rvalue."]]],[]]