Class Message (1.12.22)

public abstract class Message

A user message.

Inheritance

java.lang.Object > Message

Static Methods

builder()

public static Message.Builder builder()

Get a new builder for a message.

Returns
TypeDescription
Message.Builder

fromProto(PubSubMessage proto)

public static Message fromProto(PubSubMessage proto)

Construct a message from a proto.

Parameter
NameDescription
protoPubSubMessage
Returns
TypeDescription
Message

Constructors

Message()

public Message()

Methods

attributes()

public abstract ImmutableListMultimap<String,ByteString> attributes()

A multimap of attributes for this message.

Returns
TypeDescription
com.google.common.collect.ImmutableListMultimap<String,ByteString>

data()

public abstract ByteString data()

The data payload for this message.

Returns
TypeDescription
ByteString

eventTime()

public abstract Optional<Timestamp> eventTime()

The user-provided event time for this message.

Returns
TypeDescription
Optional<Timestamp>

key()

public abstract ByteString key()

The key for this message. All messages with the same key are routed to the same partition.

Returns
TypeDescription
ByteString

toBuilder()

public abstract Message.Builder toBuilder()

Convert an existing message to a builder.

Returns
TypeDescription
Message.Builder

toProto()

public PubSubMessage toProto()

Convert this to a message proto.

Returns
TypeDescription
PubSubMessage