Upgrade dependency camel-spring-batch / spring-batch-component

Viewed 23
1 Answers

Looking at the apache-camel project on github it was removed due to lack of components that supported a flag of that ilk.

The default job launcher in spring batch launches jobs synchronously. If you wanted to run a job asynchonously you would have to configure your own job launcher and use use an asynctaskexecutor like below

@Bean(name = "asyncJobLauncher")
public JobLauncher asyncJobLauncher() throws Exception {
    SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
    jobLauncher.setJobRepository(jobRepository);
    jobLauncher.setTaskExecutor(new SimpleAsyncTaskExecutor());
    jobLauncher.afterPropertiesSet();
    return jobLauncher;
}
Related