public sealed class ReceivedMessage : IMessage<ReceivedMessage>, IEquatable<ReceivedMessage>, IDeepCloneable<ReceivedMessage>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Pub/Sub v1 API class ReceivedMessage.
A message and its corresponding acknowledgment ID.
Optional. The approximate number of times that Pub/Sub has attempted to
deliver the associated message to a subscriber.
More precisely, this is 1 + (number of NACKs) +
(number of ack_deadline exceeds) for this message.
A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially
Subscription.ackDeadlineSeconds, but may get extended automatically by
the client library.
Upon the first delivery of a given message, delivery_attempt will have a
value of 1. The value is calculated at best effort and is approximate.
If a DeadLetterPolicy is not set on the subscription, this will be 0.
[[["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-07 UTC."],[[["\u003cp\u003eThe latest version available for the \u003ccode\u003eReceivedMessage\u003c/code\u003e class in the Google Cloud Pub/Sub v1 API is 3.23.0, while version 3.10.1 is currently being viewed in the context of the webpage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReceivedMessage\u003c/code\u003e class represents a message and its acknowledgment ID in the Google Cloud Pub/Sub v1 API and implements interfaces like IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReceivedMessage\u003c/code\u003e class has properties including \u003ccode\u003eAckId\u003c/code\u003e, \u003ccode\u003eDeliveryAttempt\u003c/code\u003e, and \u003ccode\u003eMessage\u003c/code\u003e which hold information about the acknowledgement ID, the delivery attempt number, and the message itself respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eReceivedMessage\u003c/code\u003e can be constructed with an empty constructor or from another instance of the \u003ccode\u003eReceivedMessage\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe content references a number of versions of \u003ccode\u003eReceivedMessage\u003c/code\u003e all the way back to version 2.3.0, meaning that users can look at the documentation of each of these versions using the provided links.\u003c/p\u003e\n"]]],[],null,[]]