1 ###########################################################
2 # Akka Persistence Extension Reference Configuration File #
3 ###########################################################
5 # This is the reference config file that contains all the default settings.
6 # Make your edits in your application.conf in order to override these settings.
8 # Directory of persistence journal and snapshot store plugins is available at the
9 # Akka Community Projects page https://akka.io/community/
11 # Default persistence extension settings.
14 # When starting many persistent actors at the same time the journal
15 # and its data store is protected from being overloaded by limiting number
16 # of recoveries that can be in progress at the same time. When
17 # exceeding the limit the actors will wait until other recoveries have
19 max-concurrent-recoveries = 50
21 # Fully qualified class name providing a default internal stash overflow strategy.
22 # It needs to be a subclass of akka.persistence.StashOverflowStrategyConfigurator.
23 # The default strategy throws StashOverflowException.
24 internal-stash-overflow-strategy = "akka.persistence.ThrowExceptionConfigurator"
26 # Absolute path to the journal plugin configuration entry used by
27 # persistent actor by default.
28 # Persistent actor can override `journalPluginId` method
29 # in order to rely on a different journal plugin.
31 # List of journal plugins to start automatically. Use "" for the default journal plugin.
32 auto-start-journals = []
35 # Absolute path to the snapshot plugin configuration entry used by
36 # persistent actor by default.
37 # Persistent actor can override `snapshotPluginId` method
38 # in order to rely on a different snapshot plugin.
39 # It is not mandatory to specify a snapshot store plugin.
40 # If you don't use snapshots you don't have to configure it.
41 # Note that Cluster Sharding is using snapshots, so if you
42 # use Cluster Sharding you need to define a snapshot store plugin.
44 # List of snapshot stores to start automatically. Use "" for the default snapshot store.
45 auto-start-snapshot-stores = []
47 # used as default-snapshot store if no plugin configured
48 # (see `akka.persistence.snapshot-store`)
50 class = "akka.persistence.snapshot.NoSnapshotStore"
52 # Default reliable delivery settings.
53 at-least-once-delivery {
54 # Interval between re-delivery attempts.
55 redeliver-interval = 5s
56 # Maximum number of unconfirmed messages that will be sent in one
58 redelivery-burst-limit = 10000
59 # After this number of delivery attempts a
60 # `ReliableRedelivery.UnconfirmedWarning`, message will be sent to the actor.
61 warn-after-number-of-unconfirmed-attempts = 5
62 # Maximum number of unconfirmed messages that an actor with
63 # AtLeastOnceDelivery is allowed to hold in memory.
64 max-unconfirmed-messages = 100000
66 # Default persistent extension thread pools.
68 # Dispatcher used by every plugin which does not declare explicit
69 # `plugin-dispatcher` field.
70 default-plugin-dispatcher {
71 type = PinnedDispatcher
72 executor = "thread-pool-executor"
74 # Default dispatcher for message replay.
75 default-replay-dispatcher {
77 executor = "fork-join-executor"
83 # Default dispatcher for streaming snapshot IO
84 default-stream-dispatcher {
86 executor = "fork-join-executor"
94 # Fallback settings for journal plugin configurations.
95 # These settings are used if they are not defined in plugin config section.
96 journal-plugin-fallback {
98 # Fully qualified class name providing journal plugin api implementation.
99 # It is mandatory to specify this property.
100 # The class must have a constructor without parameters or constructor with
101 # one `com.typesafe.config.Config` parameter.
104 # Dispatcher for the plugin actor.
105 plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
107 # Dispatcher for message replay.
108 replay-dispatcher = "akka.persistence.dispatchers.default-replay-dispatcher"
110 # Removed: used to be the Maximum size of a persistent message batch written to the journal.
111 # Now this setting is without function, PersistentActor will write as many messages
112 # as it has accumulated since the last write.
113 max-message-batch-size = 200
115 # If there is more time in between individual events gotten from the journal
116 # recovery than this the recovery will fail.
117 # Note that it also affects reading the snapshot before replaying events on
118 # top of it, even though it is configured for the journal.
119 recovery-event-timeout = 30s
127 # The replay filter can detect a corrupt event stream by inspecting
128 # sequence numbers and writerUuid when replaying events.
130 # What the filter should do when detecting invalid events.
132 # `repair-by-discard-old` : discard events from old writers,
134 # `fail` : fail the replay, error is logged
135 # `warn` : log warning but emit events untouched
136 # `off` : disable this feature completely
137 mode = repair-by-discard-old
139 # It uses a look ahead buffer for analyzing the events.
140 # This defines the size (in number of events) of the buffer.
143 # How many old writerUuid to remember
146 # Set this to `on` to enable detailed debug logging of each
152 # Fallback settings for snapshot store plugin configurations
153 # These settings are used if they are not defined in plugin config section.
154 snapshot-store-plugin-fallback {
156 # Fully qualified class name providing snapshot store plugin api
157 # implementation. It is mandatory to specify this property if
158 # snapshot store is enabled.
159 # The class must have a constructor without parameters or constructor with
160 # one `com.typesafe.config.Config` parameter.
163 # Dispatcher for the plugin actor.
164 plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
172 # Set this to true if successful loading of snapshot is not necessary.
173 # This can be useful when it is alright to ignore snapshot in case of
174 # for example deserialization errors. When snapshot loading fails it will instead
175 # recover by replaying all events.
176 # Don't set to true if events are deleted because that would
177 # result in wrong recovered state if snapshot load fails.
178 snapshot-is-optional = false
183 # PersistentFSM saves snapshots after this number of persistent
184 # events. Snapshots are used to reduce recovery times.
185 # When you disable this feature, specify snapshot-after = off.
186 # To enable the feature, specify a number like snapshot-after = 1000
187 # which means a snapshot is taken after persisting every 1000 events.
191 # DurableStateStore settings
193 # Absolute path to the KeyValueStore plugin configuration entry used by
194 # DurableStateBehavior actors by default.
195 # DurableStateBehavior can override `durableStateStorePluginId` method (`withDurableStateStorePluginId`)
196 # in order to rely on a different plugin.
200 # Fallback settings for DurableStateStore plugin configurations
201 # These settings are used if they are not defined in plugin config section.
202 state-plugin-fallback {
203 recovery-timeout = 30s
207 # Protobuf serialization for the persistent extension messages.
210 akka-persistence-message = "akka.persistence.serialization.MessageSerializer"
211 akka-persistence-snapshot = "akka.persistence.serialization.SnapshotSerializer"
213 serialization-bindings {
214 "akka.persistence.serialization.Message" = akka-persistence-message
215 "akka.persistence.serialization.Snapshot" = akka-persistence-snapshot
217 serialization-identifiers {
218 "akka.persistence.serialization.MessageSerializer" = 7
219 "akka.persistence.serialization.SnapshotSerializer" = 8
224 ###################################################
225 # Persistence plugins included with the extension #
226 ###################################################
228 # In-memory journal plugin.
229 akka.persistence.journal.inmem {
230 # Class name of the plugin.
231 class = "akka.persistence.journal.inmem.InmemJournal"
232 # Dispatcher for the plugin actor.
233 plugin-dispatcher = "akka.actor.default-dispatcher"
235 # Turn this on to test serialization of the events
236 test-serialization = off
239 # Local file system snapshot store plugin.
240 akka.persistence.snapshot-store.local {
241 # Class name of the plugin.
242 class = "akka.persistence.snapshot.local.LocalSnapshotStore"
243 # Dispatcher for the plugin actor.
244 plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
245 # Dispatcher for streaming snapshot IO.
246 stream-dispatcher = "akka.persistence.dispatchers.default-stream-dispatcher"
247 # Storage location of snapshot files.
249 # Number load attempts when recovering from the latest snapshot fails
250 # yet older snapshot files are available. Each recovery attempt will try
251 # to recover using an older than previously failed-on snapshot file
252 # (if any are present). If all attempts fail the recovery will fail and
253 # the persistent actor will be stopped.
254 max-load-attempts = 3
257 # LevelDB journal plugin.
258 # Note: this plugin requires explicit LevelDB dependency, see below.
259 akka.persistence.journal.leveldb {
260 # Class name of the plugin.
261 class = "akka.persistence.journal.leveldb.LeveldbJournal"
262 # Dispatcher for the plugin actor.
263 plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
264 # Dispatcher for message replay.
265 replay-dispatcher = "akka.persistence.dispatchers.default-replay-dispatcher"
266 # Storage location of LevelDB files.
268 # Use fsync on write.
270 # Verify checksum on read.
272 # Native LevelDB (via JNI) or LevelDB Java port.
274 # Number of deleted messages per persistence id that will trigger journal compaction
275 compaction-intervals {
279 # Shared LevelDB journal plugin (for testing only).
280 # Note: this plugin requires explicit LevelDB dependency, see below.
281 akka.persistence.journal.leveldb-shared {
282 # Class name of the plugin.
283 class = "akka.persistence.journal.leveldb.SharedLeveldbJournal"
284 # Dispatcher for the plugin actor.
285 plugin-dispatcher = "akka.actor.default-dispatcher"
286 # Timeout for async journal operations.
289 # Dispatcher for shared store actor.
290 store-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
291 # Dispatcher for message replay.
292 replay-dispatcher = "akka.persistence.dispatchers.default-replay-dispatcher"
293 # Storage location of LevelDB files.
295 # Use fsync on write.
297 # Verify checksum on read.
299 # Native LevelDB (via JNI) or LevelDB Java port.
301 # Number of deleted messages per persistence id that will trigger journal compaction
302 compaction-intervals {
307 akka.persistence.journal.proxy {
308 # Class name of the plugin.
309 class = "akka.persistence.journal.PersistencePluginProxy"
310 # Dispatcher for the plugin actor.
311 plugin-dispatcher = "akka.actor.default-dispatcher"
312 # Set this to on in the configuration of the ActorSystem
313 # that will host the target journal
314 start-target-journal = off
315 # The journal plugin config path to use for the target journal
316 target-journal-plugin = ""
317 # The address of the proxy to connect to from other nodes. Optional setting.
318 target-journal-address = ""
319 # Initialization timeout of target lookup
323 akka.persistence.snapshot-store.proxy {
324 # Class name of the plugin.
325 class = "akka.persistence.journal.PersistencePluginProxy"
326 # Dispatcher for the plugin actor.
327 plugin-dispatcher = "akka.actor.default-dispatcher"
328 # Set this to on in the configuration of the ActorSystem
329 # that will host the target snapshot-store
330 start-target-snapshot-store = off
331 # The journal plugin config path to use for the target snapshot-store
332 target-snapshot-store-plugin = ""
333 # The address of the proxy to connect to from other nodes. Optional setting.
334 target-snapshot-store-address = ""
335 # Initialization timeout of target lookup
339 # LevelDB persistence requires the following dependency declarations:
342 # "org.iq80.leveldb" % "leveldb" % "0.7"
343 # "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8"
347 # <groupId>org.iq80.leveldb</groupId>
348 # <artifactId>leveldb</artifactId>
349 # <version>0.7</version>
352 # <groupId>org.fusesource.leveldbjni</groupId>
353 # <artifactId>leveldbjni-all</artifactId>
354 # <version>1.8</version>