-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathpersistence.conf
281 lines (252 loc) · 12 KB
/
persistence.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
###########################################################
# Akka Persistence Extension Reference Configuration File #
###########################################################
# This is the reference config file that contains all the default settings.
# Make your edits in your application.conf in order to override these settings.
# Directory of persistence journal and snapshot store plugins is available at the
# Akka.NET Community Projects page http://getakka.net/docs/Community%20Plugins
# Default persistence extension settings.
akka.persistence {
# When starting many persistent actors at the same time the journal
# and its data store is protected from being overloaded by limiting number
# of recoveries that can be in progress at the same time. When
# exceeding the limit the actors will wait until other recoveries have
# been completed.
max-concurrent-recoveries = 50
# Fully qualified class name providing a default internal stash overflow strategy.
# It needs to be a subclass of Akka.Persistence.StashOverflowStrategyConfigurator
# The default strategy throws StashOverflowException
internal-stash-overflow-strategy = "Akka.Persistence.ThrowExceptionConfigurator, Akka.Persistence"
journal {
# Absolute path to the journal plugin configuration entry used by
# persistent actor or view by default.
# Persistent actor or view can override `journalPluginId` method
# in order to rely on a different journal plugin.
plugin = "akka.persistence.journal.inmem"
# List of journal plugins to start automatically. Use "" for the default journal plugin.
auto-start-journals = []
}
snapshot-store {
# Absolute path to the snapshot plugin configuration entry used by
# persistent actor or view by default.
# Persistent actor or view can override `snapshotPluginId` method
# in order to rely on a different snapshot plugin.
# It is not mandatory to specify a snapshot store plugin.
# If you don't use snapshots you don't have to configure it.
# Note that Cluster Sharding is using snapshots, so if you
# use Cluster Sharding you need to define a snapshot store plugin.
plugin = "akka.persistence.snapshot-store.local"
# List of snapshot stores to start automatically. Use "" for the default snapshot store.
auto-start-snapshot-stores = []
}
# used as default-snapshot store if no plugin configured
# (see `akka.persistence.snapshot-store`)
no-snapshot-store {
class = "Akka.Persistence.Snapshot.NoSnapshotStore, Akka.Persistence"
}
# Default persistent view settings.
view {
# Automated incremental view update.
auto-update = on
# Interval between incremental updates.
auto-update-interval = 5s
# Maximum number of messages to replay per incremental view update.
# Set to -1 for no upper limit.
auto-update-replay-max = -1
}
# Default reliable delivery settings.
at-least-once-delivery {
# Interval between re-delivery attempts.
redeliver-interval = 5s
# Maximum number of unconfirmed messages that will be sent in one
# re-delivery burst.
redelivery-burst-limit = 10000
# After this number of delivery attempts a
# `ReliableRedelivery.UnconfirmedWarning`, message will be sent to the actor.
warn-after-number-of-unconfirmed-attempts = 5
# Maximum number of unconfirmed messages that an actor with
# AtLeastOnceDelivery is allowed to hold in memory.
max-unconfirmed-messages = 100000
}
# Default persistent extension thread pools.
dispatchers {
# Dispatcher used by every plugin which does not declare explicit
# `plugin-dispatcher` field.
default-plugin-dispatcher {
type = PinnedDispatcher
executor = "fork-join-executor"
}
# Default dispatcher for message replay.
default-replay-dispatcher {
type = ForkJoinDispatcher
executor = "fork-join-executor"
dedicated-thread-pool {
# Fixed number of threads to have in this threadpool
thread-count = 8
}
}
# Default dispatcher for streaming snapshot IO
default-stream-dispatcher {
type = ForkJoinDispatcher
dedicated-thread-pool {
# Fixed number of threads to have in this threadpool
thread-count = 8
}
}
}
# Fallback settings for journal plugin configurations.
# These settings are used if they are not defined in plugin config section.
journal-plugin-fallback {
# Fully qualified class name providing journal plugin api implementation.
# It is mandatory to specify this property.
# The class must have a constructor without parameters or constructor with
# one `Akka.Configuration.Config` parameter.
class = ""
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
# Dispatcher for message replay.
replay-dispatcher = "akka.persistence.dispatchers.default-replay-dispatcher"
# Default serializer used as manifest serializer when applicable and payload serializer when no specific binding overrides are specified
serializer = "json"
# Removed: used to be the Maximum size of a persistent message batch written to the journal.
# Now this setting is without function, PersistentActor will write as many messages
# as it has accumulated since the last write.
max-message-batch-size = 200
# If there is more time in between individual events gotten from the Journal
# recovery than this the recovery will fail.
# Note that it also affect reading the snapshot before replaying events on
# top of it, even though iti is configured for the journal.
recovery-event-timeout = 30s
circuit-breaker {
max-failures = 10
call-timeout = 10s
reset-timeout = 30s
}
# The replay filter can detect a corrupt event stream by inspecting
# sequence numbers and writerUuid when replaying events.
replay-filter {
# What the filter should do when detecting invalid events.
# Supported values:
# `repair-by-discard-old` : discard events from old writers,
# warning is logged
# `fail` : fail the replay, error is logged
# `warn` : log warning but emit events untouche
# `off` : disable this feature completely
mode = repair-by-discard-old
# It uses a look ahead buffer for analyzing the events.
# This defines the size (in number of events) of the buffer.
window-size = 100
# How many old writerUuid to remember
max-old-writers = 10
# Set this to `on` to enable detailed debug logging of each
# replayed event.
debug = off
}
}
# Fallback settings for snapshot store plugin configurations
# These settings are used if they are not defined in plugin config section.
snapshot-store-plugin-fallback {
# Fully qualified class name providing snapshot store plugin api
# implementation. It is mandatory to specify this property if
# snapshot store is enabled.
# The class must have a constructor without parameters or constructor with
# one `Akka.Configuration.Config` parameter.
class = ""
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
# Default serializer used as manifest serializer when applicable and payload serializer when no specific binding overrides are specified
serializer = "json"
circuit-breaker {
max-failures = 5
call-timeout = 20s
reset-timeout = 60s
}
}
fsm {
# PersistentFSM saves snapshots after this number of persistent
# events. Snapshots are used to reduce recovery times.
# When you disable this feature, specify snapshot-after = off.
# To enable the feature, specify a number like snapshot-after = 1000
# which means a snapshot is taken after persisting every 1000 events.
snapshot-after = off
}
}
###################################################
# Persistence plugins included with the extension #
###################################################
# In-memory journal plugin.
akka.persistence.journal.inmem {
# Class name of the plugin.
class = "Akka.Persistence.Journal.MemoryJournal, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.actor.default-dispatcher"
}
# In-memory snapshot store plugin.
akka.persistence.snapshot-store.inmem {
# Class name of the plugin.
class = "Akka.Persistence.Snapshot.MemorySnapshotStore, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.actor.default-dispatcher"
}
# Local file system snapshot store plugin.
akka.persistence.snapshot-store.local {
# Class name of the plugin.
class = "Akka.Persistence.Snapshot.LocalSnapshotStore, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
# Dispatcher for streaming snapshot IO.
stream-dispatcher = "akka.persistence.dispatchers.default-stream-dispatcher"
# Storage location of snapshot files.
dir = "snapshots"
# Number load attempts when recovering from the latest snapshot fails
# yet older snapshot files are available. Each recovery attempt will try
# to recover using an older than previously failed-on snapshot file
# (if any are present). If all attempts fail the recovery will fail and
# the persistent actor will be stopped.
max-load-attempts = 3
}
akka.persistence.journal.proxy {
# Class name of the plugin.
class = "Akka.Persistence.Journal.PersistencePluginProxy, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.actor.default-dispatcher"
# Set this to on in the configuration of the ActorSystem
# that will host the target journal
start-target-journal = off
# The journal plugin config path to use for the target journal
target-journal-plugin = ""
# The address of the proxy to connect to from other nodes. Optional setting.
target-journal-address = ""
# Initialization timeout of target lookup
init-timeout = 10s
}
akka.persistence.snapshot-store.proxy {
# Class name of the plugin.
class = "Akka.Persistence.Journal.PersistencePluginProxy, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.actor.default-dispatcher"
# Set this to on in the configuration of the ActorSystem
# that will host the target snapshot-store
start-target-snapshot-store = off
# The journal plugin config path to use for the target snapshot-store
target-snapshot-store-plugin = ""
# The address of the proxy to connect to from other nodes. Optional setting.
target-snapshot-store-address = ""
# Initialization timeout of target lookup
init-timeout = 10s
}
# Protobuf serialization for the persistent extension messages.
akka.actor {
serializers {
akka-persistence-message = "Akka.Persistence.Serialization.PersistenceMessageSerializer, Akka.Persistence"
akka-persistence-snapshot = "Akka.Persistence.Serialization.PersistenceSnapshotSerializer, Akka.Persistence"
}
serialization-bindings {
"Akka.Persistence.Serialization.IMessage, Akka.Persistence" = akka-persistence-message
"Akka.Persistence.Serialization.Snapshot, Akka.Persistence" = akka-persistence-snapshot
}
serialization-identifiers {
"Akka.Persistence.Serialization.PersistenceMessageSerializer, Akka.Persistence" = 7
"Akka.Persistence.Serialization.PersistenceSnapshotSerializer, Akka.Persistence" = 8
}
}