You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native AOT: register the plugin through Akka.Persistence.Hosting (Akka.NET 1.6) #563
Part of the Native AOT epic: akkadotnet/akka.net#8753. Starts after akka.net #8738 and #8739 merge and Akka.NET 1.6 ships.
With Akka.DynamicTypeLoading off, Akka.NET loads persistence types from the Hosting options, not from HOCON type names. This plugin opts in by changing the base class of its Hosting options. User code does not change.
Steps
Move to Akka.NET 1.6 and fix the breaks the spike found:
Remove the System.Linq.Async package. It causes CS0121 against the net10 BCL.
Add new on ClusterShardingSpecInitializeAsync / DisposeAsync (CS0114).
Raise LangVersion from 8.
Change the options base classes: the journal options to JournalOptions<AzureTableStorageJournal, ...> and the snapshot options to SnapshotOptions<AzureBlobSnapshotStore>. Use the two-argument journal form with the read journal provider. Override ReadJournalPluginId only if the read journal path is not akka.persistence.query.journal.{Identifier}. Check the path against the plugin's HOCON.
Remove uses of JournalOptions.Adapters, if any.
Route the Setup-based overloads through typed options. These two bypass WithJournal / WithSnapshot today, so nothing registers the types with the switch off:
WithAzureTableJournal(AzureTableStorageJournalSetup setup, ...): it calls WithJournal only when a journalBuilder is passed.
WithAzureBlobsSnapshotStore(AzureBlobSnapshotSetup setup): it never calls WithSnapshot.
Call WithJournal / WithSnapshot every time with a typed options object. The Setup values must still win over the options defaults.
Keep the read journal's default HOCON in config from the Hosting extension.
Check the plugin HOCON for serializers named by type. Register them with WithCustomSerializer.
Run the Hosting tests with the switch off. Add tests for both Setup-based overloads.
Spike (earlier API): 18 of 19 Hosting tests passed with the switch off. The 1 failure was a test payload type with no serializer. Register it in code. This is a test-side fix.
TestKit-based suites work with the switch off since akka.net #8754 (merged).
Activity