Metadata for snapshots for active active (#29362)

This commit is contained in:
Christopher Batey 2020-07-16 16:06:04 +01:00
parent 2c0e837183
commit 7e91428428
8 changed files with 256 additions and 65 deletions

View file

@ -566,9 +566,11 @@ Scala
Java
: @@snip [LambdaPersistenceDocTest.java](/akka-docs/src/test/java/jdocs/persistence/LambdaPersistenceDocTest.java) { #save-snapshot }
where `metadata` is of type `SnapshotMetadata`:
where `metadata` is of type `SnapshotMetadata` and contains:
@@snip [SnapshotProtocol.scala](/akka-persistence/src/main/scala/akka/persistence/SnapshotProtocol.scala) { #snapshot-metadata }
* persistenceId
* sequenceNr
* timestamp
During recovery, the persistent actor is offered the latest saved snapshot via a `SnapshotOffer` message from
which it can initialize internal state.