How to access SnapshotStore future API?


I’m looking for a way to access the snapshot store outside of an actor, so I can load the snapshot-data of a specified persistenceId with the corresponding snapshot selection criteria in one of my persistence-queries and work on it without having to spawn an actor.

e.g. ideally I could do something like this

SnapshotStore(system).getSnapshotStore[JdbcSnapshotStore].loadAsync("my-persistence-id", SnapshotSelectionCriteria())

Any help greatly appreciated!

There is no public API for that, aside from spawning a PersistentActor.

Thanks for answering. In the meantime, I figured out a way to access it and blogged about it. You can find the post here if you’re interested: Accessing the Akka-Persistence Snapshot-Store Future-API

While figuring out this “workaround”, I thought it would be great if the Future-based part of the Snapshot-Store-Plugin API could be moved to its own trait. Also it would be cool to establish the notion of a Identifier, like we have it for the Read-Journals in the companion objects… I’m just not sure if this is wanted by the akka team, so I haven’t opened an issue yet… WDYT about this?