We have application where we are receiving file every day and it needs to be parsed and persist in db. File has 5000 record.
Should we use spring batch or spring integration? And why?
we do need to skip bad record and audit them.
Spring Batch and Spring Boot can be primarily classified as "Frameworks (Full Stack)" tools. Spring Batch and Spring Boot are both open source tools. It seems that Spring Boot with 39.8K GitHub stars and 25.8K forks on GitHub has more adoption than Spring Batch with 1.3K GitHub stars and 1.3K GitHub forks.
spring-batch-integration (part of spring-batch) has components that allow you to launch a batch job from a Spring Integration message flow, as well as components to configure a batch job to distribute work (parts of the batch job) to multiple "worker nodes" using either "remote chunking" or "partitioning".
Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring's support for remoting, messaging, and scheduling.
First, Spring Integration is NOT an ESB. It is a *routing* and *mediation* framework.
In most cases, a combination is appropriate; use Spring Integration to detect new files arriving and use the job launching gateway to launch the job. Especially if you need the richer job semantics (skip, retry etc).
See the Spring Batch documentation about using it with Spring Integration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With