K - the Kafka record key typepublic static class OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> extends Object
OutgoingKafkaRecordMetadata instances| Constructor and Description | 
|---|
| OutgoingKafkaRecordMetadataBuilder() | 
| Modifier and Type | Method and Description | 
|---|---|
| OutgoingKafkaRecordMetadata<K> | build()Create the  OutgoingKafkaRecordMetadatainstance based on the values set in this builder | 
| protected org.apache.kafka.common.header.Headers | getHeaders() | 
| protected int | getPartition() | 
| protected K | getRecordKey() | 
| protected Instant | getTimestamp() | 
| protected String | getTopic() | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withHeaders(org.apache.kafka.common.header.Headers headers)Specify headers for Kafka the timestamp for the Kafka record | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withHeaders(List<org.apache.kafka.common.header.internals.RecordHeader> headers)Specify the headers for the Kafka record | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withKey(K recordKey)Set the Kafka record key | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withPartition(int partition)In most cases Kafka's partitioner should be used to chose the Kafka partition. | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withTimestamp(Instant timestamp)Specify the timestamp for the Kafka record | 
| OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> | withTopic(String topic)By default the hardcoded topic in the configuration is used. | 
public OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withTopic(String topic)
topic - the topic namepublic OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withKey(K recordKey)
recordKey - the keypublic OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withPartition(int partition)
partition - the partition to usepublic OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withTimestamp(Instant timestamp)
timestamp - the timestamppublic OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withHeaders(org.apache.kafka.common.header.Headers headers)
headers - the headerspublic OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder<K> withHeaders(List<org.apache.kafka.common.header.internals.RecordHeader> headers)
headers - the headersprotected String getTopic()
protected K getRecordKey()
protected int getPartition()
protected Instant getTimestamp()
protected org.apache.kafka.common.header.Headers getHeaders()
public OutgoingKafkaRecordMetadata<K> build()
OutgoingKafkaRecordMetadata instance based on the values set in this builderOutgoingKafkaRecordMetadata instanceCopyright © 2018–2021 SmallRye. All rights reserved.