Lagom doesn't offer integration with MongoDB out of the box, so you'd have to roll you own.
There are two distinct parts to integrating a persistence solution in Lagom, depending on what you want. If you want to store Lagom's persistence event journal and snapshots in MongoDB, you'd need a Akka Persistence plugin and some glue code to integrate that with Lagom. There seems to be a plugin for MongoDB available, and integrating that shouldn't be too hard. You should study an existing implementation (like lagom-persistence-cassandra
or lagom-persistence-jdbc
) for inspiration.
If you're fine with storing the journal and snapshots in a supported store (Cassandra or JDBC), but needs to access MongoDB as part of your read-side, things are easier. Lagom offers generic read side support, and you're free to implement your processors however you want. The documentation page on persistence read-side should have enough information to get you started.