K
- The Kafka record key typepublic class OutgoingKafkaRecordMetadata<K> extends Object implements KafkaMessageMetadata<K>
Modifier and Type | Class and Description |
---|---|
static class |
OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K>
Builder to create
OutgoingKafkaRecordMetadata instances |
Modifier | Constructor and Description |
---|---|
protected |
OutgoingKafkaRecordMetadata(String topic,
K key,
int partition,
Instant timestamp,
org.apache.kafka.common.header.Headers headers) |
Modifier and Type | Method and Description |
---|---|
static <K> OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> |
builder()
Gets a
OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder that can be used to construct
instances of OutgoingKafkaRecordMetadata |
org.apache.kafka.common.header.Headers |
getHeaders()
Get the Kafka headers
|
K |
getKey()
Get the key
|
int |
getPartition()
Get the partition
|
Instant |
getTimestamp()
Get the timestamp
|
String |
getTopic()
Get the topic
|
public static <K> OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> builder()
OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder
that can be used to construct
instances of OutgoingKafkaRecordMetadata
K
- the Kafka record key typepublic int getPartition()
getPartition
in interface KafkaMessageMetadata<K>
public Instant getTimestamp()
getTimestamp
in interface KafkaMessageMetadata<K>
public org.apache.kafka.common.header.Headers getHeaders()
getHeaders
in interface KafkaMessageMetadata<K>
public String getTopic()
getTopic
in interface KafkaMessageMetadata<K>
public K getKey()
getKey
in interface KafkaMessageMetadata<K>
Copyright © 2018–2021 SmallRye. All rights reserved.