@ConfigurationProperties(prefix="spring.batch.job.kafkaitemreader") public class KafkaItemReaderProperties extends Object
KafkaItemReader
.Constructor and Description |
---|
KafkaItemReaderProperties() |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the configured value of the name used to calculate
ExecutionContext
keys. |
List<Integer> |
getPartitions()
A list of partitions to manually assign to the consumer.
|
long |
getPollTimeOutInSeconds()
Get the pollTimeout for the poll() operations.
|
String |
getTopic()
Returns the name of the topic from which messages will be read.
|
boolean |
isSaveState()
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
void |
setName(String name)
The name used to calculate the key within the
ExecutionContext . |
void |
setPartitions(List<Integer> partitions)
A list of partitions to manually assign to the consumer.
|
void |
setPollTimeOutInSeconds(long pollTimeOutInSeconds)
Set the pollTimeout for the poll() operations.
|
void |
setSaveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
void |
setTopic(String topic)
The topic name from which the messages will be read.
|
public String getName()
ExecutionContext
keys.public void setName(String name)
ExecutionContext
.name
- name of the writer instanceItemStreamSupport.setName(String)
public String getTopic()
public void setTopic(String topic)
topic
- name of the topicpublic List<Integer> getPartitions()
public void setPartitions(List<Integer> partitions)
partitions
- list of partitionspublic long getPollTimeOutInSeconds()
public void setPollTimeOutInSeconds(long pollTimeOutInSeconds)
pollTimeOutInSeconds
- the number of seconds to wait before timing out.public boolean isSaveState()
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. Defaults to true.public void setSaveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState
- true if state should be persisted. Defaults to true.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.