How to process multiple CSV format files using Spring batch

I am using spring batch to process my inbound files, below is my use-case

  1. will be receiving a zip contains 15 files of CSV format
  2. I need to process them in parallel
  3. after all files were processed need to do some calculation and report should be send out.

Could anyone suggest me how to implement this using Spring Batch.

Upvotes: 0

Views: 1534

Answers (1)

Nghia Do
Nghia Do

Reputation: 2658

I would like to follow the below approach

  1. Partitioner

    • Unzip the zip file
    • For each of CSV file, create a ExecutionContext and add to Queue for pararell processing.
  2. Reader will be CSV Reader provided by Spring Batch.

  3. Listener will be used to send Report when all processes are done.

Please refer this one as an example.

If you want exactly the same as your requirement, please let me know I can post one for you.

Nghia

Upvotes: 1

Related Questions