Package org.springframework.cloud.task.batch.autoconfigure.kafka

# 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

  Constructors
  Constructor
  Description
  `KafkaItemWriterProperties()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getTopic()`
  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`
  `setTopic(String topic)`
  The topic name from which the messages are written.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### KafkaItemWriterProperties

    public KafkaItemWriterProperties()

- ## Method Details

  - ### getTopic

    public String getTopic()
    Returns the name of the topic from which messages will be written.
    Returns:
      the name of the topic.

  - ### setTopic

    public void setTopic(String topic)
    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.