Class Message (1.13.5)

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
Type Description
Message.Builder

fromProto(PubSubMessage proto)

public static Message fromProto(PubSubMessage proto)

Construct a message from a proto.

Parameter
Name Description
proto PubSubMessage
Returns
Type Description
Message

Constructors

Message()

public Message()

Methods

attributes()

public abstract ImmutableListMultimap<String,ByteString> attributes()

A multimap of attributes for this message.

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

data()

public abstract ByteString data()

The data payload for this message.

Returns
Type Description
ByteString

eventTime()

public abstract Optional<Timestamp> eventTime()

The user-provided event time for this message.

Returns
Type Description
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
Type Description
ByteString

toBuilder()

public abstract Message.Builder toBuilder()

Convert an existing message to a builder.

Returns
Type Description
Message.Builder

toProto()

public PubSubMessage toProto()

Convert this to a message proto.

Returns
Type Description
PubSubMessage