Snapshot plugin

The snapshot plugin enables storing and loading snapshots for persistent actors in Spanner.


To activate the journal plugin, add the following line to your Akka application.conf:

akka.persistence.snapshot-store.plugin = "akka.persistence.spanner.snapshot"

The connection settings are shared with the journal plugin, see Journal Plugin for details.

See reference.conf for complete configuration option docs and defaults


The plugin will need a table defined like this:

sourceCREATE TABLE snapshots (
  persistence_id STRING(MAX) NOT NULL,
  sequence_nr INT64 NOT NULL,
  ser_id INT64 NOT NULL,
  ser_manifest STRING(MAX) NOT NULL,
  snapshot BYTES(MAX),
  meta BYTES(MAX),
  meta_ser_id INT64,
  meta_ser_manifest STRING(MAX),
) PRIMARY KEY (persistence_id, sequence_nr)


The snapshot plugin is used whenever a snapshot write is triggered through the Akka Persistence APIs

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.