public class KafkaItemWriterBuilder<K,V>
extends java.lang.Object
KafkaItemWriter
Constructor and Description |
---|
KafkaItemWriterBuilder() |
Modifier and Type | Method and Description |
---|---|
KafkaItemWriter<K,V> |
build()
Validates and builds a
KafkaItemWriter . |
KafkaItemWriterBuilder<K,V> |
delete(boolean delete)
Indicate if the items being passed to the writer are all to be sent as delete events to the topic.
|
KafkaItemWriterBuilder<K,V> |
itemKeyMapper(org.springframework.core.convert.converter.Converter<V,K> itemKeyMapper)
Set the
Converter to use to derive the key from the item. |
KafkaItemWriterBuilder<K,V> |
kafkaTemplate(org.springframework.kafka.core.KafkaTemplate<K,V> kafkaTemplate)
Establish the KafkaTemplate to be used by the KafkaItemWriter.
|
public KafkaItemWriterBuilder<K,V> kafkaTemplate(org.springframework.kafka.core.KafkaTemplate<K,V> kafkaTemplate)
kafkaTemplate
- the template to be usedKafkaItemWriter.setKafkaTemplate(KafkaTemplate)
public KafkaItemWriterBuilder<K,V> itemKeyMapper(org.springframework.core.convert.converter.Converter<V,K> itemKeyMapper)
Converter
to use to derive the key from the item.itemKeyMapper
- the Converter to use.KeyValueItemWriter.setItemKeyMapper(Converter)
public KafkaItemWriterBuilder<K,V> delete(boolean delete)
delete
- removal indicator.KeyValueItemWriter.setDelete(boolean)
public KafkaItemWriter<K,V> build()
KafkaItemWriter
.KafkaItemWriter