Class PubsubClient.OutgoingMessage

java.lang.Object
org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.OutgoingMessage
All Implemented Interfaces:
Serializable
Enclosing class:
PubsubClient

public abstract static class PubsubClient.OutgoingMessage extends Object implements Serializable
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 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

      public abstract @Nullable 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.
    • topic

      public abstract @Nullable String 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)