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-05 UTC."],[[["The latest version available is 2.37.0-rc, with the webpage listing version options from 2.11.0 up to this latest release candidate."],["This page provides documentation and version-specific links to the `PullResponse` struct within the Google Cloud Pub/Sub C++ library."],["The `PullResponse` struct is associated with a handler, and message redelivery behavior depends on whether the `handler.ack()` or `handler.nack()` functions are invoked."],["The behavior of redelivery is dictated by the subscription type, with exactly-once delivery subscriptions ceasing redelivery after a successful `handler.ack()`, while best-effort subscriptions may redeliver even after successful acknowledgment."],["If the handler is not an rvalue, `std::move(handler).ack()` or `std::move(handler).nack()` may need to be utilized, depending on if the message should be acknowledged or negatively acknowledged respectively."]]],[]]