public interface KafkaProducerRecord<K,V>
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
addHeader(KafkaHeader) but with a key/value pair |
KafkaProducerRecord<K,V> |
addHeader(String key,
String value)
Like
addHeader(KafkaHeader) but with a key/value pair |
KafkaProducerRecord<K,V> |
addHeaders(List<KafkaHeader> headers)
Add a list of headers to this record.
|
static <K,V> KafkaProducerRecord<K,V> |
create(String topic,
K key,
V value)
Create a concrete instance of a Vert.x producer record
|
static <K,V> KafkaProducerRecord<K,V> |
create(String topic,
K key,
V value,
Integer partition)
Create a concrete instance of a Vert.x producer record
|
static <K,V> KafkaProducerRecord<K,V> |
create(String topic,
K key,
V value,
Long timestamp,
Integer partition)
Create a concrete instance of a Vert.x producer record
|
static <K,V> KafkaProducerRecord<K,V> |
create(String topic,
V value)
Create a concrete instance of a Vert.x producer record
|
List<KafkaHeader> |
headers() |
K |
key() |
Integer |
partition() |
org.apache.kafka.clients.producer.ProducerRecord<K,V> |
record() |
Long |
timestamp() |
String |
topic() |
V |
value() |
static <K,V> KafkaProducerRecord<K,V> create(String topic, K key, V value, Long timestamp, Integer partition)
K
- key typeV
- value typetopic
- 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)static <K,V> KafkaProducerRecord<K,V> create(String topic, K key, V value, Integer partition)
K
- key typeV
- value typetopic
- 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)static <K,V> KafkaProducerRecord<K,V> create(String topic, K key, V value)
K
- key typeV
- value typetopic
- the topic this record is being sent tokey
- the key (or null if no key is specified)value
- the valuestatic <K,V> KafkaProducerRecord<K,V> create(String topic, V value)
K
- key typeV
- value typetopic
- the topic this record is being sent tovalue
- the valueString topic()
K key()
V value()
Long timestamp()
Integer partition()
KafkaProducerRecord<K,V> addHeader(String key, String value)
addHeader(KafkaHeader)
but with a key/value pairKafkaProducerRecord<K,V> addHeader(String key, Buffer value)
addHeader(KafkaHeader)
but with a key/value pairKafkaProducerRecord<K,V> addHeader(KafkaHeader header)
header
- the headerKafkaProducerRecord<K,V> addHeaders(List<KafkaHeader> headers)
headers
- the headersList<KafkaHeader> headers()
Copyright © 2024 Eclipse. All rights reserved.