Class PubsubClient.OutgoingMessage
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.OutgoingMessage
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- PubsubClient
public abstract static class PubsubClient.OutgoingMessage extends java.lang.Object implements java.io.Serializable
A message to be sent to Pubsub.NOTE: This class is
Serializable
only to support thePubsubTestClient
. Java serialization is never used for non-test clients.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OutgoingMessage()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.google.pubsub.v1.PubsubMessage
message()
Underlying Message.static PubsubClient.OutgoingMessage
of(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, @Nullable java.lang.String recordId)
static PubsubClient.OutgoingMessage
of(PubsubMessage message, long timestampMsSinceEpoch, @Nullable java.lang.String recordId)
abstract @Nullable java.lang.String
recordId()
If using an id attribute, the record id to associate with this record's metadata so the receiver can reject duplicates.abstract long
timestampMsSinceEpoch()
Timestamp for element (ms since epoch).
-
-
-
Method Detail
-
message
public abstract com.google.pubsub.v1.PubsubMessage message()
Underlying Message. May not have publish timestamp set.
-
timestampMsSinceEpoch
public abstract long timestampMsSinceEpoch()
Timestamp for element (ms since epoch).
-
recordId
public abstract @Nullable java.lang.String recordId()
If using an id attribute, the record id to associate with this record's metadata so the receiver can reject duplicates. Otherwise null.
-
of
public static PubsubClient.OutgoingMessage of(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, @Nullable java.lang.String recordId)
-
of
public static PubsubClient.OutgoingMessage of(PubsubMessage message, long timestampMsSinceEpoch, @Nullable java.lang.String recordId)
-
-