Closed
Description
OBSERVED BEHAVIOR
KafkaItemReader always reset offset to zero even when the last job execution was finished OK.
So, if my batch runs every night to process a Kafka topic it doesn't work because it will read all messages every night not just the messages not processed.
ROOT CAUSE
KafkaItemReader line 248:
for (TopicPartition topicPartition : this.topicPartitions) {
this.partitionOffsets.put(topicPartition, 0L);
}
PROPOSED SOLUTIONS
Remove these lines and don't set offset to 0 anymore.