public interface RawMessage
The message needs to be released when the processing is done.
| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
getData()
Get the content of the message.
|
long |
getEventTime()
Get the event time associated with this message.
|
Optional<String> |
getKey()
Get the key of the message.
|
Optional<io.netty.buffer.ByteBuf> |
getKeyBytes()
Get byteBuf of the key.
|
RawMessageId |
getMessageId()
Get the unique message ID associated with this message.
|
String |
getProducerName()
Get the producer name who produced this message.
|
Map<String,String> |
getProperties()
Return the properties attached to the message.
|
long |
getPublishTime()
Get the publish time of this message.
|
byte[] |
getSchemaVersion()
Get the schema verison of the message.
|
long |
getSequenceId()
Get the sequence id associated with this message.
|
boolean |
hasBase64EncodedKey()
Check whether the key has been base64 encoded.
|
void |
release()
Release all the resources associated with this raw message.
|
void release()
Map<String,String> getProperties()
Properties are application defined key/value pairs that will be attached to the message.
io.netty.buffer.ByteBuf getData()
RawMessageId getMessageId()
The message id can be used to univocally refer to a message without having the keep the entire payload in memory.
Only messages received from the consumer will have a message id assigned.
long getPublishTime()
getEventTime()long getEventTime()
MessageBuilder#setEventTime(long).
If there isn't any event time associated with this event, it will return 0.
long getSequenceId()
MessageBuilder#setSequenceId(long).MessageBuilder#setEventTime(long)String getProducerName()
byte[] getSchemaVersion()
Optional<io.netty.buffer.ByteBuf> getKeyBytes()
boolean hasBase64EncodedKey()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.