Reference documentation and code samples for the Cloud Pub/Sub API class Google::Cloud::PubSub::AcknowledgeResult.
The result of a ack/nack/modack on messages.
When the operation was successful the result will be marked
#succeeded?. Otherwise, the result will be marked #failed? and the
error raised will be availabe on #error.
Inherits
Object
Methods
#error
deferror()->Google::Cloud::Error
Returns
(Google::Cloud::Error) — Error object of ack/modack operation
#failed?
deffailed?()->Boolean
Returns
(Boolean) — Whether the operation failed.
#status
defstatus()->Numeric
Returns
(Numeric) — Status of the ack/modack operation.
#succeeded?
defsucceeded?()->Boolean
Returns
(Boolean) — Whether the operation was successful.
Constants
SUCCESS
value: 1 The constants below represents the status of ack/modack operations.
Indicates successful ack/modack
PERMISSION_DENIED
value: 2 Indicates occurence of permenant permission denied error
FAILED_PRECONDITION
value: 3 Indicates occurence of permenant failed precondition error
INVALID_ACK_ID
value: 4 Indicates occurence of permenant permission denied error
OTHER
value: 5 Indicates occurence of permenant uncatogorised error
[[["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-09-04 UTC."],[],[],null,["# Cloud Pub/Sub API - Class Google::Cloud::PubSub::AcknowledgeResult (v3.0.2)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.2 (latest)](/ruby/docs/reference/google-cloud-pubsub/latest/Google-Cloud-PubSub-AcknowledgeResult)\n- [3.0.1](/ruby/docs/reference/google-cloud-pubsub/3.0.1/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.23.0](/ruby/docs/reference/google-cloud-pubsub/2.23.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.22.0](/ruby/docs/reference/google-cloud-pubsub/2.22.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.21.0](/ruby/docs/reference/google-cloud-pubsub/2.21.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.20.0](/ruby/docs/reference/google-cloud-pubsub/2.20.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.19.0](/ruby/docs/reference/google-cloud-pubsub/2.19.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.18.1](/ruby/docs/reference/google-cloud-pubsub/2.18.1/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.17.0](/ruby/docs/reference/google-cloud-pubsub/2.17.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.16.0](/ruby/docs/reference/google-cloud-pubsub/2.16.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.15.5](/ruby/docs/reference/google-cloud-pubsub/2.15.5/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.14.0](/ruby/docs/reference/google-cloud-pubsub/2.14.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.12.1](/ruby/docs/reference/google-cloud-pubsub/2.12.1/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.11.0](/ruby/docs/reference/google-cloud-pubsub/2.11.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.10.0](/ruby/docs/reference/google-cloud-pubsub/2.10.0/Google-Cloud-PubSub-AcknowledgeResult)\n- [2.9.2](/ruby/docs/reference/google-cloud-pubsub/2.9.2/Google-Cloud-PubSub-AcknowledgeResult) \nReference documentation and code samples for the Cloud Pub/Sub API class Google::Cloud::PubSub::AcknowledgeResult.\n\nThe result of a ack/nack/modack on messages.\n\n\n\u003cbr /\u003e\n\nWhen the operation was successful the result will be marked\n[#succeeded?](/ruby/docs/reference/google-cloud-pubsub/latest/Google-Cloud-PubSub-AcknowledgeResult#Google__Cloud__PubSub__AcknowledgeResult_succeeded__instance_ \"Google::Cloud::PubSub::AcknowledgeResult#succeeded? (method)\"). Otherwise, the result will be marked [#failed?](/ruby/docs/reference/google-cloud-pubsub/latest/Google-Cloud-PubSub-AcknowledgeResult#Google__Cloud__PubSub__AcknowledgeResult_failed__instance_ \"Google::Cloud::PubSub::AcknowledgeResult#failed? (method)\") and the\nerror raised will be availabe on [#error](/ruby/docs/reference/google-cloud-pubsub/latest/Google-Cloud-PubSub-AcknowledgeResult#Google__Cloud__PubSub__AcknowledgeResult_error_instance_ \"Google::Cloud::PubSub::AcknowledgeResult#error (method)\"). \n\nInherits\n--------\n\n- Object\n\nMethods\n-------\n\n### #error\n\n def error() -\u003e Google::Cloud::Error\n\n**Returns**\n\n- (Google::Cloud::Error) --- Error object of ack/modack operation\n\n### #failed?\n\n def failed?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean) --- Whether the operation failed.\n\n### #status\n\n def status() -\u003e Numeric\n\n**Returns**\n\n- (Numeric) --- Status of the ack/modack operation.\n\n### #succeeded?\n\n def succeeded?() -\u003e Boolean\n\n**Returns**\n\n- (Boolean) --- Whether the operation was successful.\n\nConstants\n---------\n\n### SUCCESS\n\n**value:** 1 \nThe constants below represents the status of ack/modack operations.\nIndicates successful ack/modack\n\n### PERMISSION_DENIED\n\n**value:** 2 \nIndicates occurence of permenant permission denied error\n\n### FAILED_PRECONDITION\n\n**value:** 3 \nIndicates occurence of permenant failed precondition error\n\n### INVALID_ACK_ID\n\n**value:** 4 \nIndicates occurence of permenant permission denied error\n\n### OTHER\n\n**value:** 5 \nIndicates occurence of permenant uncatogorised error"]]