0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks, almost inline with my problem. the difference is the file formats are not same. thinking of create different reader, processor and writer classes. Could you post yours, thanks again
For 15 files, what indicator tells you which reader will be used? If we have the indicator we can have a delegate to switch Readers. Why we need to create different Processor and Writer? Is that all behaviours changes base on input file?
yes you are correct, I can have a delegate to process them. do you have any other examples apart from one you posted above.
What exact example you are looking for? Let me know I can write one for you.
basically looking for example of listener. a report to be generated when all processors are done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.