Class Message.Builder (1.6.1)

public abstract static class Message.Builder

Inheritance

java.lang.Object > Message.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract Message build()

Build a message.

Returns
TypeDescription
Message

setAttributes(ImmutableListMultimap<String,ByteString> attributes)

public abstract Message.Builder setAttributes(ImmutableListMultimap<String,ByteString> attributes)

A multimap of attributes for this message.

Parameter
NameDescription
attributescom.google.common.collect.ImmutableListMultimap<String,ByteString>
Returns
TypeDescription
Message.Builder

setData(ByteString data)

public abstract Message.Builder setData(ByteString data)

The data payload for this message.

Parameter
NameDescription
dataByteString
Returns
TypeDescription
Message.Builder

setEventTime(Timestamp eventTime)

public abstract Message.Builder setEventTime(Timestamp eventTime)

The user provided event time for this message.

Parameter
NameDescription
eventTimeTimestamp
Returns
TypeDescription
Message.Builder

setKey(ByteString key)

public abstract Message.Builder setKey(ByteString key)

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

Parameter
NameDescription
keyByteString
Returns
TypeDescription
Message.Builder