Lagom: Allow programmatic control over persistent entity lifecycle

Created on 10 Oct 2017  路  7Comments  路  Source: lagom/lagom

Some use cases would benefit from more direct control over the persistent entity lifecycle.

For example:

  1. Manually trigger passivation, for example in readonly command handler
  2. Define a hook to do some cleanup on passivation
  3. Co-locate a persistent entity with a related actor on the same node
  4. Manually trigger snapshotting (see #1014)
persistence-api

Most helpful comment

  1. Remove history (events and snapshots) up to the current (last) event. GDPR use case.

All 7 comments

Related: #1014

(Added 4. on the description)

+1

  1. Remove history (events and snapshots) up to the current (last) event. GDPR use case.

Hi @kotdv I think your suggestion 5. (in https://github.com/lagom/lagom/issues/1042#issuecomment-451772773) is out of scope here. All the items on the description above are related to extending Lagom's feature set closer to the featureset of Akka Persistence itself. Rewriting (or removing) history is not supported in Akka Persistence.

I can't overstate how valuable this would be for a few problems I'm trying to solve.

I think most or all of the cases above are covered by the first class support for the Akka Persistence Typed API introduced in Lagom 1.6:

If there are additional specific controls needed, I think the best thing would be to start a thread in the forums to discuss them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jroper picture jroper  路  3Comments

ignasi35 picture ignasi35  路  6Comments

TimMoore picture TimMoore  路  8Comments

lapidus79 picture lapidus79  路  3Comments

domkun picture domkun  路  8Comments