A Akka.net Persistence plugin that provides no persistence whatsoever.
If you have a reusable compontent/actor that was designed to be
persistent but you want to reuse the given actor in a non-persistent
manner. Using the builtin in memory persistence keeps all received
messages in memory causing the memory usage of the application to grow
over the lifetime of the execution of the application. This
persistence plugin implements an AsyncJournal
and a SnapshotStore
that store and therefor recover nothing and always succeed at
doing that 😉.
- Add the package reference:
dotnet add package Akka.Persistence.NoPersistence
- Configure your application as described here:
akka.persistence { journal { plugin = "akka.persistence.journal.none" # No persistence journal plugin. none { # Class name of the plugin. class = "Akka.Persistence.NoPersistence.EmptyJournal, Akka.Persistence.NoPersistence" # Dispatcher for the plugin actor. plugin-dispatcher = "akka.actor.default-dispatcher" } } snapshot-store { plugin = "akka.persistence.snapshot-store.none" # No persistence snapshot-store plugin. none { # Class name of the plugin. class = "Akka.Persistence.NoPersistence.EmptySnapshotStore, Akka.Persistence.NoPersistence" # Dispatcher for the plugin actor. plugin-dispatcher = "akka.actor.default-dispatcher" } }
This work is licensed under the LGPL license, refer to the COPYING.md and COPYING.LESSER.md files for details.