public class KafkaMessage extends DefaultMessage
| Constructor and Description |
|---|
KafkaMessage()
Empty constructor initializing with empty message payload.
|
KafkaMessage(Object payload)
Default constructor using message payload.
|
KafkaMessage(Object payload,
Map<String,Object> headers)
Default constructor using payload and headers.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getMessageKey()
Gets the Kafka message key header.
|
Long |
getOffset()
Gets the Kafka offset header.
|
Integer |
getPartition()
Gets the Kafka partition header.
|
Long |
getTimestamp()
Gets the Kafka timestamp header.
|
String |
getTopic()
Gets the Kafka topic header.
|
KafkaMessage |
messageKey(Object key)
Sets the Kafka message key header.
|
KafkaMessage |
offset(long offset)
Sets the Kafka offset header.
|
KafkaMessage |
partition(int partition)
Sets the Kafka partition id header.
|
KafkaMessage |
timestamp(Long timestamp)
Sets the Kafka timestamp header.
|
KafkaMessage |
topic(String topic)
Sets the Kafka topic key header.
|
addHeaderData, getHeader, getHeaderData, getHeaders, getId, getName, getPayload, getPayload, removeHeader, setHeader, setName, setPayload, toStringpublic KafkaMessage()
public KafkaMessage(Object payload, Map<String,Object> headers)
payload - headers - public KafkaMessage(Object payload)
payload - public KafkaMessage partition(int partition)
partition - public KafkaMessage timestamp(Long timestamp)
timestamp - public KafkaMessage offset(long offset)
offset - public KafkaMessage messageKey(Object key)
key - public KafkaMessage topic(String topic)
topic - public Integer getPartition()
public Long getTimestamp()
getTimestamp in class DefaultMessagepublic Long getOffset()
public Object getMessageKey()
public String getTopic()
Copyright © 2008–2019 ConSol Software GmbH. All rights reserved.