Lagom snapshot and persistent entity storage configuration

I have a couple of things I would like to configure and would be happy to know if it’s possible in Lagom.

  1. I would like to consolidate events into a snapshot after a period of inactivity in a persistent entity (for example, if my persistent entity contains only a couple of events but there were no new events in the last month). Is there such a configuration? After the snapshot is created, are the events deleted from the messages table in cassandra?

  2. I would like to store different persistent entities in different cassandra servers (for example, based on geographic location). In the configuration there is a single configuration for cassandra “contact-points”. Is it possible to define multiple configurations with different contact points and choose for each persistent entity which contact points it will use?

Thanks

1 Like

Hi,

  1. currently custom snapshot strategy is not supported. Snapshots are created after configurable number of events: lagom.persistence.snapshot-after = 100. This is per entity instance.
    Events are not deleted after snapshotting. Generally there is not automatic deletion of events.

  2. there is Lightbend commercial feature Akka Multi-DC Persistence

Hope this helps.

Br,
Alan

1 Like