Class PubsubClient.IncomingMessage
java.lang.Object
org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.IncomingMessage
- All Implemented Interfaces:
Serializable
- Enclosing class:
PubsubClient
A message received from Pubsub.
NOTE: This class is Serializable only to support the PubsubTestClient. Java
serialization is never used for non-test clients.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract 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, String ackId, String recordId) abstract StringrecordId()Id to pass to the runner to distinguish this message from all others.abstract longTimestamp (in system time) at which we requested the message (ms since epoch).abstract longTimestamp for element (ms since epoch).
-
Constructor Details
-
IncomingMessage
public IncomingMessage()
-
-
Method Details
-
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
Id to pass back to Pubsub to acknowledge receipt of this message. -
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, String ackId, String recordId)
-