Class PubsubClient.OutgoingMessage
java.lang.Object
org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.OutgoingMessage
- All Implemented Interfaces:
Serializable
- Enclosing class:
PubsubClient
A message to be sent to 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 com.google.pubsub.v1.PubsubMessage
Underlying Message.abstract long
Timestamp for element (ms since epoch).static PubsubClient.OutgoingMessage
of
(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, @Nullable String recordId, @Nullable String topic) static PubsubClient.OutgoingMessage
of
(PubsubMessage message, long timestampMsSinceEpoch, @Nullable String recordId, @Nullable String topic) recordId()
If using an id attribute, the record id to associate with this record's metadata so the receiver can reject duplicates.topic()
-
Constructor Details
-
OutgoingMessage
public OutgoingMessage()
-
-
Method Details
-
getMessage
public abstract com.google.pubsub.v1.PubsubMessage getMessage()Underlying Message. May not have publish timestamp set. -
getTimestampMsSinceEpoch
public abstract long getTimestampMsSinceEpoch()Timestamp for element (ms since epoch). -
recordId
If using an id attribute, the record id to associate with this record's metadata so the receiver can reject duplicates. Otherwise null. -
topic
-
of
public static PubsubClient.OutgoingMessage of(com.google.pubsub.v1.PubsubMessage message, long timestampMsSinceEpoch, @Nullable String recordId, @Nullable String topic) -
of
public static PubsubClient.OutgoingMessage of(PubsubMessage message, long timestampMsSinceEpoch, @Nullable String recordId, @Nullable String topic)
-