Class PubsubClient.IncomingMessage

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

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

      public abstract String ackId()
      Id to pass back to Pubsub to acknowledge receipt of this message.
    • recordId

      public abstract 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, String ackId, String recordId)