I am working on a spring batch solution and planning to use MongoDB as a job repository. I am looking for a references on this implementation but could not get any references. Then I was checking the spring-batch-core-3.0.7.RELEASE.jar, there I could not able to see MongoDB schema. Does this mean Spring batch does not support MongoDB as job repository?
2 Answers
That is correct. Mongo is not a suitable data store for the job repository due to the transactionality requirements of the job repository. The data store must be ACID compliant in order to be used which is why we have focused our efforts on relational databases for the repository implementation to date.
-
so you don t recommand working spring batch with MongoDb together !! any whys ?– tero17Apr 2, 2018 at 14:07
-
1@tero17 Gitter is a better location for this kind of question: gitter.im/spring-batch/Lobby Apr 2, 2018 at 15:10
There is a recent (v1.0.0 in 2021-11-02) project to handle that, it's not managed by Spring team : https://github.com/europeana/spring-batch-mongo
This library provides MongoDB JobRepository support for Spring Batch.
On official Spring side, there is this opened issue : https://github.com/spring-projects/spring-batch/issues/877