We need to use spring batch in an application which already uses a NoSQL product (MarkLogic). I know that as a pre-requisite spring-batch uses some relational tables for infrastructure management and monitoring like batch status etc.
Does spring-batch provide a way via which we can configure it to work with NoSQL products like this?
Spring Batch Job Repository is based on JDBC DAOs and support a close set of RDBM’s. For example in Spring Batch 2.2.5 its DB2, HSQL, SQLSERVER, MYSQL, ORACLE, POSTGRES,SYBASE, H2.
See org.springframework.batch.support.DatabaseType class from spring-batch-infrastructure-x.x.x.jar
As mentioned in Rafik Beldi answer Memory Based Job Repository is supported as well. Those can be a good solution if you do not care about past executions. In memory database like h2 support file based persistent that my help (although limited and unreliable from my point of view).
If you have to support NoSQL you need to develop your own or look for some existing project in github.
Basically starting by overriding JobRepositoryFactoryBean and adding your own DAOs (located under
org.springframework.batch.core.repository package in spring-batch-core jar).
For more information:
It will be nice if someone from Spring Batch team will give us some information if NoSQL support for job repository are planed to the near feature.
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