public interface KafkaRecord<K,T> extends Message<T>
Modifier and Type | Method and Description |
---|---|
static <K,T> OutgoingKafkaRecord<K,T> |
from(Message<T> message) |
org.apache.kafka.common.header.Headers |
getHeaders() |
K |
getKey() |
int |
getPartition() |
Instant |
getTimestamp() |
String |
getTopic() |
static <K,T> OutgoingKafkaRecord<K,T> |
of(K key,
T value)
Creates a new outgoing Kafka record.
|
static <K,T> OutgoingKafkaRecord<K,T> |
of(String topic,
K key,
T value)
Creates a new outgoing Kafka record.
|
static <K,T> OutgoingKafkaRecord<K,T> |
of(String topic,
K key,
T value,
Instant timestamp,
int partition)
Creates a new outgoing Kafka record.
|
ack, addMetadata, getAck, getMetadata, getMetadata, getNack, getPayload, nack, nack, of, of, of, unwrap, withAck, withMetadata, withMetadata, withNack, withPayload
static <K,T> OutgoingKafkaRecord<K,T> from(Message<T> message)
static <K,T> OutgoingKafkaRecord<K,T> of(K key, T value)
static <K,T> OutgoingKafkaRecord<K,T> of(String topic, K key, T value)
static <K,T> OutgoingKafkaRecord<K,T> of(String topic, K key, T value, Instant timestamp, int partition)
K
- the type of the keyT
- the type of the valuetopic
- the topic, must not be null
key
- the key, can be null
value
- the value / payload, must not be null
timestamp
- the timestamp, can be null to indicate no timestamppartition
- the partition, can be -1
to indicate no partitionK getKey()
String getTopic()
int getPartition()
Instant getTimestamp()
org.apache.kafka.common.header.Headers getHeaders()
Copyright © 2018–2021 SmallRye. All rights reserved.