Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring integration vs spring batch [closed]

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.

like image 722
user509755 Avatar asked Jun 23 '15 00:06

user509755


People also ask

What is difference between spring and Spring Batch?

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.

What is Spring Batch integration?

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".

What is Spring Integration for?

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.

Is Spring Integration an ESB?

First, Spring Integration is NOT an ESB. It is a *routing* and *mediation* framework.


1 Answers

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.

like image 94
Gary Russell Avatar answered Jan 02 '23 12:01

Gary Russell