Storage
Synapse currently supports two ways of storing data:
-
Locally in an embedded database
-
In AxonServer
Since HA does require you to use AxonServer as the storage backend, also refer to High Availability.
When switching between storage types, you lose the stored configuration. |
Selecting the used storage type
Synapse allows you to select the used storage implementation by configuring the property synapse.storage.type
.
The only valid values are axonserver
and local
.
Local storage
When using local storage (synapse.storage.type=local
), Synapse stores all its configuration in its own local embedded database. Your specific Synapse instance utilizes these settings, which are unique for your instance.
Axon Server storage
When using AxonServer as the storage implementation (synapse.storage.type=axonserver
), Synapse uses a context in the specified AxonServer to store its configuration. It also uses the local embedded database to keep a representation of the current state.
Using AxonServer storage does require you to have multiple contexts in your AxonServer, which in turn requires you to have a valid license for AxonServer. |
Many synapse instances can share the configuration stored when using AxonServer as the storage implementation. Refer to High Availability to find out more about this feature.
When connecting to AxonServer, Synapse may need to authenticate itself. To allow for a fine-grained Access Control List (ACL), configure a separate token used for connecting to the storage context. Use the property synapse.storage.token
.
Further, you may need to change the used context for storing Synapse configuration. Use the property: synapse.storage.context
. To see all supported configuration options, refer to Configuration
Switching storage types
It currently isn’t possible to switch between storage types whilst keeping your Synapse data.
To achieve reproducible and easier-to-migrate setups, consider setting up the configuration in an automated way. This allows you, should you decide to switch storage types, to wipe the Synapse storage, change the used implementation and then use your automation to re-create the configuration.
If you want to change the used implementation, you have to remove the Synapse database file (axon-synapse.mv.db
by default) before changing the settings. This means losing stored configuration.