I have the following Step:
return stepBuilderFactory.get("billStep")
.allowStartIfComplete(true)
.chunk(20000)
.reader(billReader)
.processor(billProcessor)
.faultTolerant()
.skipLimit(Integer.MAX_VALUE)
.skip(BillSkipException.class)
.listener(billReaderListener)
.listener(billSkipListener)
.writer(billRepoItemWriter)
.build();
Is my understanding correct, that fault tolerant means that when an exception is thrown in billProcessor, it will be processed in skip listener and then the next row/item will be processed in billProcessor?
I noticed upon adding in debug logs - that items/rows were "re-processed" when an exception is thrown in the processor. (probably because of faultTolerant config. But, what if I am processing 2 million records, and 300,000 of them were skipped - or throws a skip exception - isn't it an issue in performance if some of these were "re-processed")
And the big problem is - the next row/item is skipped. They were not processed in the processor at all.
If I remove the faultTolerant and SkipListener - and directly save the skipped records in the database (what skiplistener is doing) - it is working, but is this solution correct?