0
votes

If I use partitioning (let's say 10 partitions) and chunks in Spring Batch with a Task Executor like this

<task:executor id="partitionExecutor" pool-size="30" queue-capacity="50" />

on how many Threads will each partition run?

2

2 Answers

3
votes

Each partition is run within it's own thread if you're using multi-threaded partitioning. Granted, that doesn't stop you from doing other thread related things within the worker step...

0
votes

When spring batch uses a partitioning strategy, a thread will be used by each partition and it will execute the whole complete step. This avoids concurrency problems with respect to simple multithreading strategies