Spring Batch framework use case examples with Kotlin
01-basic-job
- basic multi-step job example02-first-last-flows
- flow suffixed and prefied with a step03-...
04-decision-based-stepping
- conditional (decision based) job stepping05-nested-jobs
- nested parent-child jobs showcasing job within job structuring.06-pre-post-listeners
- pre-chunk and after-chunk listeners.07-job-parameters
- sending in job parameters to a job
08-stateless-item-reader-chunk-job
- read items in chunks from a list09-reading-from-db
- read items in chunks from database10-reading-from-fs
- read items in chunks from file system (csv format)11-reading-from-xml
- read items in chunks from XML file12-reading-from-multiple-fs
- read items in chunks from multiple files in FS13-reading-stateful-cycle
- read items and track events during cycle in a stateful manner
14-writing-basic
- writing a basic list of ints to sysout15-writing-items-to-db
- writing items to a jdbc database source16-writing-items-to-fs
- writing items to a flat file17-writing-items-to-xml
- writing items to an XML file18-writing-to-multiple-files
- writing items to multiple files/formats
19-processing-basic
- processing an item, basic example20-processing-filtering
- processing an item, filtering items21-processing-validating
- processsing an item, validating and filtering22-processing-chaining
- processing an item, chaining processors
23-restarting-jobs
- if job fails during processing, batch restarts from an offset24-retrying-steps
- if step fails, retry N times until working25-skipping-steps
- if step fails, skip the step that failed26-listen-on-skips
- attach listeners to items that are skipped
27-multi-thread-step
- Multi-threaded step (each chunk is processed in its own thread)28-async-processors
- AsyncItemProcessor - itemprocessor returns a Future, itemwriter unwraps resolved Future29-local-partitioner
- Split step into 4 batches and process in a grid of 430-remote-partitioner
- Split step into multiple remote jvm's passing commands over RabbitMQ and channels
./gradlew clean build
java -jar -Dspring.profiles.active=slave build/libs/spring-batch-examples.jar -minValue=1 -maxValue=100000
java -jar -Dspring.profiles.active=master build/libs/spring-batch-examples.jar -minValue=1 -maxValue=100000
31-remote-chunking
- Split process chunks into remote JVMs (RabbitMQ)
./gradlew clean build
java -jar -Dspring.profiles.active=slave build/libs/spring-batch-examples.jar
java -jar -Dspring.profiles.active=master build/libs/spring-batch-examples.jar
32-starting-a-job
- Starting a job via HTTP endpoint33-stopping-a-job
- Stopping a job via HTTP endpoint34-scheduling-a-job
- Scheduling a job via Spring scheduler35-controlling-via-integration
- Controlling job via message-passing (Spring Integration)
36-informational-messages
- Display info messages for chunk and job milestones