-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Imagine the following scenario:
- 2 actors: A, B
- A is eventsourced and
- gets message from "outside"
- updates its internal state
- computes new messages and sends them to B
- B is not eventsourced
- gets message only from A
- updates its internal state
In this case taking snapshots in a straightforward manner does not lead to consistent recovery as message sent from A to B could be either applied twice or get lost. For consistent recovery the following trick can be applied:
- Send SnapshotRequest to A
- A creates A-snapshot and does not call SnapshotRequest.process, but forwards its snapshot in custom message to B
- B creates B-snapshot and combines it with received A-snapshot to AB-snapshot
- B calls SnapshotRequest.process(AB-snapshot)
Having library support for this kind of consistent snapshots could relieve a developer from implementing the described process and probably saves a couple of process related custom types.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels