title: Spring Batch-How to process multiple records at the same time in the processor?
body: <p>I have a file to parse and process records from. It is working fine as line-by-line (parsing one record at a time). My requirement is I've to parse thru multiple line and fetch the required information from each records and then after combining the fetched info from all the records, I call a service to perform business logic. I have to perform this logic inside my Processor class. The data looks like as below example:</p>
  
  <p>001  123456         987654321551580 Wayne DR                                1</p>
  
  <p>001  123456         987654321552APT 786                                     1</p>
  
  <p>001  123456         987654321553LOS ANGELES                                 1</p>
  
  <p>001  123456         987654321554CA                                          1</p>
  
  <p>001  123456         98765432155590001                                       1</p>
  
  <p>The data element available at columns 30-32 is what I am interested to fetch from each record. In the above example, the values 551, 552, 553, 554, 555 in each line respectively. They all come in together in the file. So basically when the current item in my processor parses the first line and finds out that its '551' (means Address Line1 in business code), then I want to fetch the rest of the address that follows this line and save them in one complete address. At the end I want to pass this address to the service class from the processor and then move on to parse the next record available in the file. My problem is that the processor works on line by line for each record so this way I am not able to keep track/association between all these related lines.
  Sorry if I am not able to explain my problem in an easier way..I am new to Spring Batch and still learning. </p>