I'm trying to upgrade an existing (demo) project from Akka.Net 1.0.8 to something more recent (1.3.2 or whatever).
I'm stuck on getting the SQL server persistence to load. I've taken the following steps:
- Created a blank project, and included the Akka.Persistence.SqlServer package and all of its dependencies
- Copied the HOCON configuration example from here:
- Changed the DB connection strings to an existing DB
- Set the auto-initialize to 'on'
- Fixed the double quote issue in akka.persistence.journal-store.sql-server.plugin-dispatcher
- Created an Actor System
- Inspected the SQL server configuration for the presence of my connection string
Results:
- 1.3.2: connection string not present (seems like the default fallback configuration), nothing happens in the DB
- 1.0.8: connection string is present, config seems correct, tables are created in an empty DB.
Here is the HOCON configuration I used:
akka.persistence{
journal {
plugin = "akka.persistence.journal.sql-server"
sql-server {
# qualified type name of the SQL Server persistence journal actor
class = "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
# dispatcher used to drive journal actor
plugin-dispatcher = "akka.actor.default-dispatcher"
# connection string used for database access
connection-string = "Data Source=(LocalDB)\\MSSQLLocalDB;Initial Catalog=AkkaPersistence;Integrated Security=True"
# default SQL commands timeout
connection-timeout = 30s
# SQL server schema name to table corresponding with persistent journal
schema-name = dbo
# SQL server table corresponding with persistent journal
table-name = EventJournal
# should corresponding journal table be initialized automatically
auto-initialize = on
# timestamp provider used for generation of journal entries timestamps
timestamp-provider = "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
# metadata table
metadata-table-name = Metadata
}
}
snapshot-store {
plugin = "akka.persistence.snapshot-store.sql-server"
sql-server {
# qualified type name of the SQL Server persistence journal actor
class = "Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
# dispatcher used to drive journal actor
plugin-dispatcher = "akka.actor.default-dispatcher"
# connection string used for database access
connection-string = "Data Source=(LocalDB)\\MSSQLLocalDB;Initial Catalog=AkkaPersistence;Integrated Security=True"
# default SQL commands timeout
connection-timeout = 30s
# SQL server schema name to table corresponding with persistent journal
schema-name = dbo
# SQL server table corresponding with persistent journal
table-name = SnapshotStore
# should corresponding journal table be initialized automatically
auto-initialize = on
}
}
}
Is there a way to troubleshoot the loading of the loading of the HOCON configuration?