Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Get the content of the message
|
Optional<EncryptionContext> |
getEncryptionCtx()
EncryptionContext contains encryption and compression information in it using which application can
decrypt consumed message with encrypted-payload. |
long |
getEventTime()
Get the event time associated with this message.
|
MessageId |
getInnerMessageId() |
String |
getKey()
Get the key of the message
|
byte[] |
getKeyBytes()
Get bytes in key.
|
Message<T> |
getMessage() |
MessageId |
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.
|
String |
getProperty(String name)
Get the value of a specific property
|
long |
getPublishTime()
Get the publish time of this message.
|
long |
getSequenceId()
Get the sequence id associated with this message.
|
String |
getTopicName()
Get the topic name without partition part of this message.
|
String |
getTopicPartitionName()
Get the topic name which contains partition part for this message.
|
T |
getValue() |
boolean |
hasBase64EncodedKey()
Check whether the key has been base64 encoded.
|
boolean |
hasKey()
Check whether the message has a key
|
boolean |
hasProperty(String name)
Check whether the message has a specific property attached.
|
public String getTopicName()
getTopicName
in interface Message<T>
public String getTopicPartitionName()
public MessageId getMessageId()
Message
getMessageId
in interface Message<T>
public MessageId getInnerMessageId()
public Map<String,String> getProperties()
Message
getProperties
in interface Message<T>
public boolean hasProperty(String name)
Message
hasProperty
in interface Message<T>
name
- the name of the property to checkpublic String getProperty(String name)
Message
getProperty
in interface Message<T>
name
- the name of the propertypublic byte[] getData()
Message
public long getPublishTime()
Message
getPublishTime
in interface Message<T>
Message.getEventTime()
public long getEventTime()
Message
MessageBuilder.setEventTime(long)
.
If there isn't any event time associated with this event, it will return 0.
getEventTime
in interface Message<T>
MessageBuilder.setEventTime(long)
public long getSequenceId()
Message
MessageBuilder.setSequenceId(long)
.getSequenceId
in interface Message<T>
MessageBuilder.setEventTime(long)
public String getProducerName()
Message
getProducerName
in interface Message<T>
public boolean hasKey()
Message
public boolean hasBase64EncodedKey()
Message
hasBase64EncodedKey
in interface Message<T>
public byte[] getKeyBytes()
Message
getKeyBytes
in interface Message<T>
public Optional<EncryptionContext> getEncryptionCtx()
Message
EncryptionContext
contains encryption and compression information in it using which application can
decrypt consumed message with encrypted-payload.getEncryptionCtx
in interface Message<T>
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.