'Using MongoDB as Spring batch job repository

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



Solution 1:[1]

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.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Sylvain K.