3

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?

enter image description here

2 Answers 2

8

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.

2
  • so you don t recommand working spring batch with MongoDb together !! any whys ?
    – tero17
    Apr 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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.