Configuration - sorokinigor/akka-persistence-hazelcast GitHub Wiki
Please, read the reference.conf for a detailed description of the plugin properties. See unit tests for configuration examples.
Hazelcast
Hazelcast should be configured via it's xml configuration. By default, hazelcast.xml
is used. It can be overridden with hazelcast.config-file
.
It is highly recommended to manually configure the plugin's internal maps in the Hazelcast configuration. The default names are:
hazelcast.journal.map-name=akka-persistence-journal
hazelcast.journal.highest-deleted-sequence-number-map-name = "akka-persistence-highest-deleted-sequence-number"
hazelcast.snapshot-store.map-name = "akka-persistence-snapshot-store"
Akka
To activate the plugin, you can use this snippet:
akka.persistence {
journal.plugin = "hazelcast.journal"
snapshot-store.plugin = "hazelcast.snapshot-store"
}
Plugin
Internally, the plugin uses a dedicated thread pool for writes. If you want to override it, use hazelcast.write-dispatcher
.
By default, persistAll
methods are not supported. You can override this behaviour by:
- Enabling transactions by setting
hazelcast.transaction.enabled
totrue
. See more about Hazelcast's transactions. - Setting
hazelcast.journal.fail-on-non-atomic-persist-all
tofalse
. Internally, it starts to useputAll
, but it is not an atomic operation in Hazelcast, therefore, this is likely to lead to an inconsistent state. This approach is not recommended.