Class Message.Builder (1.13.8)

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

setAttributes(ImmutableListMultimap<String,ByteString> attributes)

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

A multimap of attributes for this message.

Parameter
Name Description
attributes com.google.common.collect.ImmutableListMultimap<String,ByteString>
Returns
Type Description
Message.Builder

setData(ByteString data)

public abstract Message.Builder setData(ByteString data)

The data payload for this message.

Parameter
Name Description
data ByteString
Returns
Type Description
Message.Builder

setEventTime(Timestamp eventTime)

public abstract Message.Builder setEventTime(Timestamp eventTime)

The user provided event time for this message.

Parameter
Name Description
eventTime Timestamp
Returns
Type Description
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
Name Description
key ByteString
Returns
Type Description
Message.Builder