Spring Batch and Spring Integration
Typically, a batch application can be triggered via a command-line interface or programmatically, for example, from a web container. Let's introduce Spring Integration and see the possibilities:
- It can be triggered on an event, for example, a file adapter listening for a file triggers Spring Integration on arrival of the file.
- Execution can be chained in a flow—trigger the job, pass on the result, invoke the error path, and so on.
- The message queue is not meant for huge amounts of data. So for big files, Spring Integration can act as the trigger, while delegating the actual task to Spring Batch. It can provide a strategy to chunk the files and distribute them across the Spring Batch job.
- Spring Integration not only ...