Package com.google.cloud.pubsublite
Class Message
java.lang.Object
com.google.cloud.pubsublite.Message
A user message.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract com.google.common.collect.ImmutableListMultimap<String,com.google.protobuf.ByteString> A multimap of attributes for this message.static Message.Builderbuilder()Get a new builder for a message.abstract com.google.protobuf.ByteStringdata()The data payload for this message.abstract Optional<com.google.protobuf.Timestamp>The user-provided event time for this message.static MessagefromProto(PubSubMessage proto) Construct a message from a proto.abstract com.google.protobuf.ByteStringkey()The key for this message.abstract Message.BuilderConvert an existing message to a builder.toProto()Convert this to a message proto.
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
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
The user-provided event time for this message. -
builder
Get a new builder for a message. -
toBuilder
Convert an existing message to a builder. -
toProto
Convert this to a message proto. -
fromProto
Construct a message from a proto.
-