Paolo Tormon
Paolo Tormon

Reputation: 341

Spring Batch Stop/Start Master Job

I want to run Spring Batch v4 in a multi-JVM instance (each instance on a different machine) and use SQS to distribute the work from master to the worker JVMs (Remote Partitioning) .

Once the master hands off the partitions to the channel (for the workers), I am planning to shutdown the master step so it won't consume resources (so it's not a long-running task). Once the job is completed, I will then restart the master to finish the job.

Is my approach correct? What are the possible pitfalls?

Upvotes: 0

Views: 45

Answers (1)

Mahmoud Ben Hassine
Mahmoud Ben Hassine

Reputation: 31600

That approach is not correct. And this really is not where you should be looking for optimisations. The manager is responsible for gathering replies from workers and reconciling their statuses, so it has to be up until workers are done (either successfully or with a failure).

Upvotes: 1

Related Questions