Send feedback
Class ReceivedMessage (1.122.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.122.0 keyboard_arrow_down
public final class ReceivedMessage extends GeneratedMessageV3 implements ReceivedMessageOrBuilder
A message and its corresponding acknowledgment ID.
Protobuf type google.pubsub.v1.ReceivedMessage
Static Fields
ACK_ID_FIELD_NUMBER
public static final int ACK_ID_FIELD_NUMBER
Field Value
DELIVERY_ATTEMPT_FIELD_NUMBER
public static final int DELIVERY_ATTEMPT_FIELD_NUMBER
Field Value
MESSAGE_FIELD_NUMBER
public static final int MESSAGE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static ReceivedMessage getDefaultInstance ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
newBuilder()
public static ReceivedMessage . Builder newBuilder ()
Returns
newBuilder(ReceivedMessage prototype)
public static ReceivedMessage . Builder newBuilder ( ReceivedMessage prototype )
Parameter
Returns
public static ReceivedMessage parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static ReceivedMessage parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static ReceivedMessage parseFrom ( byte [] data )
Parameter
Name Description data byte []
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ReceivedMessage parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static ReceivedMessage parseFrom ( ByteString data )
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ReceivedMessage parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static ReceivedMessage parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static ReceivedMessage parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static ReceivedMessage parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static ReceivedMessage parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static ReceivedMessage parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ReceivedMessage parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parser()
public static Parser<ReceivedMessage> parser ()
Returns
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
Overrides
getAckId()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Returns
Type Description String The ackId.
getAckIdBytes()
public ByteString getAckIdBytes ()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Returns
getDefaultInstanceForType()
public ReceivedMessage getDefaultInstanceForType ()
Returns
getDeliveryAttempt()
public int getDeliveryAttempt ()
The approximate number of times that Cloud 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.
int32 delivery_attempt = 3;
Returns
Type Description int The deliveryAttempt.
getMessage()
public PubsubMessage getMessage ()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
getMessageOrBuilder()
public PubsubMessageOrBuilder getMessageOrBuilder ()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
getParserForType()
public Parser<ReceivedMessage> getParserForType ()
Returns
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Returns
Overrides
hasMessage()
public boolean hasMessage ()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
Type Description boolean Whether the message field is set.
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
newBuilderForType()
public ReceivedMessage . Builder newBuilderForType ()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ReceivedMessage . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
toBuilder()
public ReceivedMessage . Builder toBuilder ()
Returns
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["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-01-27 UTC."],[],[]]