-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Serializer setup not propagating to Persistence #127
Comments
Thanks @bauersystems - we'll look into this |
@bauersystems SELECT ej.SerializerId FROM EventJournal ej WHERE ej.PersistenceId = 'client_bauer-systems' AND ej.SequenceNr = 1 |
The proper |
@bauersystems The workaround is to add these custom HOCON configuration in: builder
.AddHocon(@"
akka.persistence.journal.sql-server.serializer = hyperion
akka.persistence.snapshot-store.sql-server.serializer = hyperion", HoconAddMode.Prepend)) These settings are a bit obscure, it overrides the object type serializer for that specific journal/snapshot store configuration. |
You can also override the default behaviour by using these HOCON settings: builder
.AddHocon(@"
akka.persistence.journal-plugin-fallback.serializer = null
akka.persistence.snapshot-store-plugin-fallback.serializer = null
", HoconAddMode.Prepend) |
Actually, this is rather old: akkadotnet/akka.net#3133 (comment) |
Changing this would potentially break and/or change the behavior of systems that is already in the wild since it requires changes to be made on Akka.NET core. We will leave this as is. |
@Aaronontheweb Maybe we should add a new extension to |
@bauersystems @Arkatufus I'm thinking this is a bug with Akka.Persistence and it needs to be fixed akkadotnet/akka.net#6389 |
(cherry picked from commit 75e24b3)
* Reproduction unit test for akkadotnet/Akka.Hosting#127 (cherry picked from commit 75e24b3) * Clarify the unit test (cherry picked from commit a0b5e8f) * Remove persistence default serializer feature (cherry picked from commit 3cf2eee) * Revert changes on EventRead, add legacy data read test (cherry picked from commit b1daa66) * Revert persistence.conf changes, modify sqlite database to mimic legacy data (cherry picked from commit f3fd0e9) * Resolve conflicts * Update API Verify list * Add legacy data test * Add sqlite data and fix tests
Version Information
Akka - v1.4.43
Akka.Hosting - v0.4.3
Akka.Persistence.SqlServer.Hosting - v0.4.3
Akka.Serialization.Hyperion - v1.4.43
Describe the bug
When setting up Hyperion as the default serializer via Akka.Hosting configuration, persistence still uses Json as the default serializer and has to be configured separately to use Hyperion.
To Reproduce
I used a configuration similar to the following:
Expected behavior
When setting up Hyperion as the default serializer, this setting should be propagated through-out the Akka.net modules.
Actual behavior
Json was still the default serializer for persistence.
Screenshots
Environment
Windows 11
.Net 6.0
Additional context
The text was updated successfully, but these errors were encountered: