spring batch one step job in parallel

I’m writing a batch application based on Spring Batch. The goal of this application is to read a CSV file, and for each entry, make an HTTP call to an endpoint.

I’ve followed the spring.io tutorial and it looks like this and works great.

@Configuration
@EnableBatchProcessing
public class MigrationBatchConfiguration {

@Autowired
public JobBuilderFactory jobBuilderFactory;

@Autowired
public StepBuilderFactory stepBuilderFactory;

@Bean
public FlatFileItemReader<MigrationItem> reader() {
    FlatFileItemReader<MigrationItem> reader = new FlatFileItemReader<>();
    reader.setResource(new ClassPathResource("extract-learningpaths.csv"));
    reader.setLineMapper(new DefaultLineMapper<MigrationItem>() {{
        setLineTokenizer(new DelimitedLineTokenizer() {{
            setNames(new String[] { "id", "userId", "studyLanguage", "addonIds", "addonCodes", "score", "scoreCode", "resultId" });
            setDelimiter(";");
        }});
        setFieldSetMapper(new BeanWrapperFieldSetMapper<MigrationItem>() {{
            setTargetType(MigrationItem.class);
        }});
    }});
    return reader;
}

@Bean
public MigrationItemProcessor migrationItemProcessor() {
    return new MigrationItemProcessor();
}

@Bean
public Job migrationJob(MigrationCompletionNotificationListener listener) {
    return jobBuilderFactory.get("migrationJob")
            .incrementer(new RunIdIncrementer())
            .listener(listener)
            .flow(readAndProcess())
            .end()
            .build();
}

@Bean
public Step readAndProcess() {
    return stepBuilderFactory.get("readAndProcess")
            .<MigrationItem, MigrationItem> chunk(10)
            .reader(reader())
            .processor(migrationItemProcessor())
            .build();
}

}

This version waits for the processor to be completed before starting the process of the next item. But each item could be processed independently and I was wondering what would be the best approach to achieve this ?

I added an AsyncItemProcessor with a SimpleAsyncTaskExecutor as follow, but is it the best approach ?

@Bean
public Step readAndProcess() {
    return stepBuilderFactory.get("readAndProcess")
            .<MigrationItem, Void>chunk(10)
            .reader(reader())
            .processor(asyncItemProcessor())
            .build();
}

@Bean
public ItemProcessor asyncItemProcessor() {
    AsyncItemProcessor<MigrationItem, Void> asyncItemProcessor = new AsyncItemProcessor<>();
    asyncItemProcessor.setDelegate(migrationItemProcessor());
    asyncItemProcessor.setTaskExecutor(taskExecutor());
    return asyncItemProcessor;
}

@Bean
public TaskExecutor taskExecutor() {
    SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
    return taskExecutor;
}

And what if I want to add a writer to a CSV after the processing ? The AsyncItemProcessor returns a FutureTask which is not what I want to write, what would be the best approach ?