Class PubsubClient.IncomingMessage
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.IncomingMessage
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- PubsubClient
public abstract static class PubsubClient.IncomingMessage extends java.lang.Object implements java.io.SerializableA message received from Pubsub.NOTE: This class is
Serializableonly to support thePubsubTestClient. Java serialization is never used for non-test clients.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IncomingMessage()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringackId()Id to pass back to Pubsub to acknowledge receipt of this message.abstract com.google.pubsub.v1.PubsubMessagemessage()Underlying Message.static PubsubClient.IncomingMessageof(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, long requestTimeMsSinceEpoch, java.lang.String ackId, java.lang.String recordId)abstract java.lang.StringrecordId()Id to pass to the runner to distinguish this message from all others.abstract longrequestTimeMsSinceEpoch()Timestamp (in system time) at which we requested the message (ms since epoch).abstract longtimestampMsSinceEpoch()Timestamp for element (ms since epoch).
-
-
-
Method Detail
-
message
public abstract com.google.pubsub.v1.PubsubMessage message()
Underlying Message.
-
timestampMsSinceEpoch
public abstract long timestampMsSinceEpoch()
Timestamp for element (ms since epoch). Either Pubsub's processing time, or the custom timestamp associated with the message.
-
requestTimeMsSinceEpoch
public abstract long requestTimeMsSinceEpoch()
Timestamp (in system time) at which we requested the message (ms since epoch).
-
ackId
public abstract java.lang.String ackId()
Id to pass back to Pubsub to acknowledge receipt of this message.
-
recordId
public abstract java.lang.String recordId()
Id to pass to the runner to distinguish this message from all others.
-
of
public static PubsubClient.IncomingMessage of(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, long requestTimeMsSinceEpoch, java.lang.String ackId, java.lang.String recordId)
-
-