Techiio-author
Started by Debarghya DasSep 15, 2021

Open
Spring Batch commit-interval configuration not working

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I have a simple program working with Spring Batch Input reader, Writer. The purpose of the program is to simple read a csv file.

I have set the commit-interval to 5. The csv file had only 5 records but for some reason the Writer was called 3 times although the commit-interval was set to 5. I was expecting that the writer would be called only once based on my understanding that the item reader and processor would read each item line by line and then the writer would process all 5 at once. I guess I am not clear about the impact of commit-interval. Any advise?

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance