public class KafkaProducerRecordImpl<K,V> extends Object implements KafkaProducerRecord<K,V>
| Constructor and Description |
|---|
KafkaProducerRecordImpl(String topic,
K key,
V value)
Constructor
|
KafkaProducerRecordImpl(String topic,
K key,
V value,
Integer partition)
Constructor
|
KafkaProducerRecordImpl(String topic,
K key,
V value,
Long timestamp,
Integer partition)
Constructor
|
KafkaProducerRecordImpl(String topic,
V value)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
KafkaProducerRecord<K,V> |
addHeader(KafkaHeader header)
Add an header to this record.
|
KafkaProducerRecord<K,V> |
addHeader(String key,
Buffer value)
Like
KafkaProducerRecord.addHeader(KafkaHeader) but with a key/value pair |
KafkaProducerRecord<K,V> |
addHeader(String key,
String value)
Like
KafkaProducerRecord.addHeader(KafkaHeader) but with a key/value pair |
KafkaProducerRecord<K,V> |
addHeaders(List<KafkaHeader> headers)
Add a list of headers to this record.
|
List<KafkaHeader> |
headers() |
K |
key() |
Integer |
partition() |
org.apache.kafka.clients.producer.ProducerRecord<K,V> |
record() |
Long |
timestamp() |
String |
topic() |
String |
toString() |
V |
value() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreate, create, create, createpublic KafkaProducerRecordImpl(String topic, K key, V value, Long timestamp, Integer partition)
topic - the topic this record is being sent tokey - the key (or null if no key is specified)value - the valuetimestamp - the timestamp of this recordpartition - the partition to which the record will be sent (or null if no partition was specified)public KafkaProducerRecordImpl(String topic, K key, V value, Integer partition)
topic - the topic this record is being sent tokey - the key (or null if no key is specified)value - the valuepartition - the partition to which the record will be sent (or null if no partition was specified)public KafkaProducerRecordImpl(String topic, K key, V value)
topic - the topic this record is being sent tokey - the key (or null if no key is specified)value - the valuepublic String topic()
topic in interface KafkaProducerRecord<K,V>public K key()
key in interface KafkaProducerRecord<K,V>public Long timestamp()
timestamp in interface KafkaProducerRecord<K,V>public V value()
value in interface KafkaProducerRecord<K,V>public Integer partition()
partition in interface KafkaProducerRecord<K,V>public KafkaProducerRecord<K,V> addHeader(String key, Buffer value)
KafkaProducerRecordKafkaProducerRecord.addHeader(KafkaHeader) but with a key/value pairaddHeader in interface KafkaProducerRecord<K,V>public KafkaProducerRecord<K,V> addHeader(String key, String value)
KafkaProducerRecordKafkaProducerRecord.addHeader(KafkaHeader) but with a key/value pairaddHeader in interface KafkaProducerRecord<K,V>public KafkaProducerRecord<K,V> addHeader(KafkaHeader header)
KafkaProducerRecordaddHeader in interface KafkaProducerRecord<K,V>header - the headerpublic KafkaProducerRecord<K,V> addHeaders(List<KafkaHeader> headers)
KafkaProducerRecordaddHeaders in interface KafkaProducerRecord<K,V>headers - the headerspublic org.apache.kafka.clients.producer.ProducerRecord<K,V> record()
record in interface KafkaProducerRecord<K,V>public List<KafkaHeader> headers()
headers in interface KafkaProducerRecord<K,V>Copyright © 2020. All rights reserved.