Class Message


  • public abstract class Message
    extends Object
    A user message.
    • Constructor Detail

      • Message

        public Message()
    • Method Detail

      • key

        public abstract com.google.protobuf.ByteString key()
        The key for this message. All messages with the same key are routed to the same partition.
      • data

        public abstract com.google.protobuf.ByteString data()
        The data payload for this message.
      • attributes

        public abstract com.google.common.collect.ImmutableListMultimap<String,​com.google.protobuf.ByteString> attributes()
        A multimap of attributes for this message.
      • eventTime

        public abstract Optional<com.google.protobuf.Timestamp> eventTime()
        The user-provided event time for this message.
      • builder

        public static Message.Builder builder()
        Get a new builder for a message.
      • toBuilder

        public abstract Message.Builder toBuilder()
        Convert an existing message to a builder.
      • toProto

        public PubSubMessage toProto()
        Convert this to a message proto.
      • fromProto

        public static Message fromProto​(PubSubMessage proto)
        Construct a message from a proto.