title: Spring Batch JdbcCursorItemReader or RepositoryItemReader?
body: <p>I'm writing a batch processing with Spring Batch. I have to move circa about 2 000 000 records from the datasource (Oracle database) to the target (Kafka broker). I'm hesitating which ItemReader should I choose for this job:</p>
  
  <ul>
  <li><p><strong>JdbcCursorItemReader</strong>: if I understand correctly it will open the cursor, which will be iterating through the ResultSet of ALL of those records, one by one, performance is no issue; under the hood database keeps a snapshot of records satisfying <em>where</em> clause at the time of query execution;</p></li>
  <li><p><strong>RepositoryItemReader</strong>: might be less performant, partitioning based on paging mechanism, for each page the query will be executed, possibility of ommiting some records which could be written to database during fetch of 2 000 000 records, which wouldn't happen in the former case (is my reasoning even correct?)</p></li>
  </ul>
  
  <p>Summary: As a result I want to send all of those 2 000 000 records as they were at the time of the query execution in a partitioned manner. Am I overthinking this problem? Maybe skipping new records isn't such a problem in case of the future executions of the job for updates? Or maybe my reasoning regarding RepositoryItemReader is not correct?</p>