Helps to prevent flooding destinations which are unavailable for a long time with messages once they become available.
185 lines
4.9 KiB
Text
185 lines
4.9 KiB
Text
##########################################
|
|
# Akka Persistence Reference Config File #
|
|
##########################################
|
|
|
|
|
|
|
|
akka {
|
|
|
|
# Protobuf serialization for persistent messages
|
|
actor {
|
|
|
|
serializers {
|
|
|
|
akka-persistence-snapshot = "akka.persistence.serialization.SnapshotSerializer"
|
|
akka-persistence-message = "akka.persistence.serialization.MessageSerializer"
|
|
}
|
|
|
|
serialization-bindings {
|
|
|
|
"akka.persistence.serialization.Snapshot" = akka-persistence-snapshot
|
|
"akka.persistence.serialization.Message" = akka-persistence-message
|
|
}
|
|
}
|
|
|
|
persistence {
|
|
|
|
journal {
|
|
|
|
# Maximum size of a persistent message batch written to the journal.
|
|
max-message-batch-size = 200
|
|
|
|
# Maximum size of a confirmation batch written to the journal.
|
|
max-confirmation-batch-size = 10000
|
|
|
|
# Maximum size of a deletion batch written to the journal.
|
|
max-deletion-batch-size = 10000
|
|
|
|
# Path to the journal plugin to be used
|
|
plugin = "akka.persistence.journal.leveldb"
|
|
|
|
# In-memory journal plugin.
|
|
inmem {
|
|
|
|
# Class name of the plugin.
|
|
class = "akka.persistence.journal.inmem.InmemJournal"
|
|
|
|
# Dispatcher for the plugin actor.
|
|
plugin-dispatcher = "akka.actor.default-dispatcher"
|
|
}
|
|
|
|
# LevelDB journal plugin.
|
|
leveldb {
|
|
|
|
# Class name of the plugin.
|
|
class = "akka.persistence.journal.leveldb.LeveldbJournal"
|
|
|
|
# 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"
|
|
|
|
# Storage location of LevelDB files.
|
|
dir = "journal"
|
|
|
|
# Use fsync on write
|
|
fsync = on
|
|
|
|
# Verify checksum on read.
|
|
checksum = off
|
|
|
|
# Native LevelDB (via JNI) or LevelDB Java port
|
|
native = on
|
|
}
|
|
|
|
# Shared LevelDB journal plugin (for testing only).
|
|
leveldb-shared {
|
|
|
|
# Class name of the plugin.
|
|
class = "akka.persistence.journal.leveldb.SharedLeveldbJournal"
|
|
|
|
# Dispatcher for the plugin actor.
|
|
plugin-dispatcher = "akka.actor.default-dispatcher"
|
|
|
|
# timeout for async journal operations
|
|
timeout = 10s
|
|
|
|
store {
|
|
|
|
# Dispatcher for shared store actor.
|
|
store-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
|
|
|
|
# Dispatcher for message replay.
|
|
replay-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
|
|
|
|
# Storage location of LevelDB files.
|
|
dir = "journal"
|
|
|
|
# Use fsync on write
|
|
fsync = on
|
|
|
|
# Verify checksum on read.
|
|
checksum = off
|
|
|
|
# Native LevelDB (via JNI) or LevelDB Java port
|
|
native = on
|
|
}
|
|
}
|
|
}
|
|
|
|
snapshot-store {
|
|
|
|
# Path to the snapshot store plugin to be used
|
|
plugin = "akka.persistence.snapshot-store.local"
|
|
|
|
# Local filesystem snapshot store plugin.
|
|
local {
|
|
|
|
# Class name of the plugin.
|
|
class = "akka.persistence.snapshot.local.LocalSnapshotStore"
|
|
|
|
# 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"
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
at-least-once-delivery {
|
|
# Interval between redelivery attempts
|
|
redeliver-interval = 5s
|
|
|
|
# Maximum number of unconfirmed messages that will be sent in one redelivery 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
|
|
}
|
|
|
|
dispatchers {
|
|
default-plugin-dispatcher {
|
|
type = PinnedDispatcher
|
|
executor = "thread-pool-executor"
|
|
}
|
|
default-replay-dispatcher {
|
|
type = Dispatcher
|
|
executor = "fork-join-executor"
|
|
fork-join-executor {
|
|
parallelism-min = 2
|
|
parallelism-max = 8
|
|
}
|
|
}
|
|
default-stream-dispatcher {
|
|
type = Dispatcher
|
|
executor = "fork-join-executor"
|
|
fork-join-executor {
|
|
parallelism-min = 2
|
|
parallelism-max = 8
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|