title: WSO2 ESB 6.1.0 Batch Processing
body: <p>I have a requirement to process 10 million records in MS SQL database using WSO2 ESB.</p>
  
  <p>Input file can be XML or Flat file.
  I have created a dataservice provided in WSO2 ESB.</p>
  
  <p>Now, I start process to read from XML and insert into MS SQL database, I want to commit every 5000 records during processing via ESB so that if 5001 record fails, I can restart the processing from 5001 record instead of 0.</p>
  
  <p>First problem, commit is happening for all records at once. I want to configure it in such a way that it should process 5000 records, commits in DB and then proceed with next set of records. Additionally, if the batch job fails after processing 10000 records, I want the batch job to start processing from 100001 record and not from 0</p>
  
  <p>Please suggest ideas.</p>
  
  <p>Thanks,
  Abhishek</p>