I have a spring boot web application and I want to upload details from CSV files through a batch process. Files can be upload from any location and I want to restrict the process 3 jobs at a time. if already in process of 3 files, we have to give that information to UI as, "Throttle limit is being reached. Try after some time". How Could I achieve this? My current flow.xml is with master slave approach
<!-- partitioner job -->
<job id="partitionJob" xmlns="http://www.springframework.org/schema/batch">
<!-- master step -->
<step id="masterStep">
<partition step="slave" partitioner="partitioner">
<handler grid-size="1" task-executor="taskExecutor" />
</partition>
</step>
</job>
<!-- each thread will run this job, with different stepExecutionContext
values. -->
<step id="slave" xmlns="http://www.springframework.org/schema/batch">
<tasklet transaction-manager="transactionManager" throttle-limit="3">
<chunk reader="itemReader" processor="userItemProcessor" writer="itemWriter"
commit-interval="10" />
<listeners>
<listener ref="stepJobListener" />
</listeners>
</tasklet>
</step>