Active active journal support changes (#29421)

* Add missing serializers (and rename classes because metadata is a word)
* Add test instances for journal and snapshot support
* Method to add metadata to existing snapshotmetadata
* Better error message if replicated stream does not have metadata
* Snapshot store tck support for metadata
* Docs for tck coverage of AA metadata
This commit is contained in:
Johan Andrén 2020-07-28 16:13:18 +02:00 committed by Christopher Batey
parent e4f5781d65
commit b8a1584e10
16 changed files with 3970 additions and 622 deletions

View file

@ -290,7 +290,9 @@ to fast forward the stream of events for the origin replica. (With additional po
## Journal Support
For a journal plugin to support active active it needs to store and read metadata for each event if it is defined in the @apiref[PersistentRepr]
`metadata` field. To attach the metadata after writing it, `PersistentRepr.withMetadata` is used.
`metadata` field. To attach the metadata after writing it, `PersistentRepr.withMetadata` is used. The @apidoc[JournalSpec] in the Persistence TCK provides
a capability flag `supportsMetadata` to toggle verification that metadata is handled correctly.
For a snapshot plugin to support active active it needs to store and read metadata for the snapshot if it is defined in the @apiref[akka.persistence.SnapshotMetadata] `metadata` field.
To attach the metadata when reading the snapshot the `akka.persistence.SnapshotMetadata.apply` factory overload taking a `metadata` parameter is used.
To attach the metadata when reading the snapshot the `akka.persistence.SnapshotMetadata.apply` factory overload taking a `metadata` parameter is used.
The @apidoc[SnapshotStoreSpec] in the Persistence TCK provides a capability flag `supportsMetadata` to toggle verification that metadata is handled correctly.