Class KafkaItemWriterProperties
java.lang.Object
org.springframework.cloud.task.batch.autoconfigure.kafka.KafkaItemWriterProperties
@ConfigurationProperties(prefix="spring.batch.job.kafkaitemwriter")
public class KafkaItemWriterProperties
extends Object
Properties to configure a
KafkaItemWriter
.- Since:
- 2.3
- Author:
- Glenn Renfro
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTopic()
Returns the name of the topic from which messages will be written.boolean
isDelete()
Indicate if the items being passed to the writer are all to be sent as delete events to the topic.void
setDelete
(boolean delete) Indicate if the items being passed to the writer are all to be sent as delete events to the topic.void
The topic name from which the messages are written.
-
Constructor Details
-
KafkaItemWriterProperties
public KafkaItemWriterProperties()
-
-
Method Details
-
getTopic
Returns the name of the topic from which messages will be written.- Returns:
- the name of the topic.
-
setTopic
The topic name from which the messages are written.- Parameters:
topic
- name of the topic
-
isDelete
public boolean isDelete()Indicate if the items being passed to the writer are all to be sent as delete events to the topic. A delete event is made of a key with a null value. If set to false (default), the items will be sent with provided value and key converter by the itemKeyMapper. If set to true, the items will be sent with the key converter from the value by the itemKeyMapper and a null value.- Returns:
- removal indicator.
-
setDelete
public void setDelete(boolean delete) Indicate if the items being passed to the writer are all to be sent as delete events to the topic. A delete event is made of a key with a null value. If set to false (default), the items will be sent with provided value and key converter by the itemKeyMapper. If set to true, the items will be sent with the key converter from the value by the itemKeyMapper and a null value.- Parameters:
delete
- removal indicator.
-