Rathna
Rathna

Reputation: 83

Spring batch- Parallel processing

I am running the spring batch job in three machines. For example the database has 30 records, the batch job in each machine has to pick up unique 10 records and process it.

I read partitioning and Parallel processing and bit confused, which one is suitable?

Appreciate your help.

Upvotes: 0

Views: 2220

Answers (1)

Michael Minella
Michael Minella

Reputation: 21503

What you are describing is partitioning. Partitioning is when the input is broken up into partitions and each partition is processed in parallel. Spring Batch offers two different ways to execute partitioning, one is local using threads (via the TaskExecutorPartitionHandler). The other one is distributing the partitions via messages so they can be executed either locally or remotely via the MessageChannelPartitionHandler found in Spring Batch Admin's spring-batch-integration project. You can learn more about remote partitioning via my talk on multi-jvm batch processing here: http://www.youtube.com/watch?v=CYTj5YT7CZU

Upvotes: 2

Related Questions