title: Spring Batch Job
body: <p>We have two tables. In one table, data keep on inserting from different sources. </p>
  
  <p>Requirement is, we need to read the records from that table and copy them into another table. Only those records which are not read previously by the batch program should be read and insert the records to another table. </p>
  
  <p>We thought of using the <code>Spring Batch</code> running periodically. Batch will run periodically (every 10 mins) and copy the data (only those records which are not copied to another table) from that table and insert into another table. </p>
  
  <p>My question is, if a batch process picks 100 records at a time how another instance of batch process (if two instances run of a batch job) knows a set of records are already been picked up from DB? And in case of failure happens while copying the data how should I handle that scenario.</p>