Akka.net v1.5.0-alpha1 Release Notes
Release Date: 2022-08-22 // over 2 years ago-
โฌ๏ธ Akka.NET v1.5.0-alpha1 is a major release that contains a lot of code improvement and rewrites/refactors. Major upgrades to Akka.Cluster.Sharding in particular.
๐ Deprecation
๐ฆ Some codes and packages are being deprecated in v1.5
- ๐ฆ Deprecated/removed Akka.DI package
Please use the new
Akka.DependencyInjection
NuGet package as a replacement. Documentation can be read here - ๐ฆ Deprecated/removed Akka.MultiNodeTestRunner package
Please use the new
Akka.MultiNode.TestAdapter
NuGet package as a replacement. Documentation can be read here. - ๐จ [Streams] Refactor
SetHandler(Inlet, Outlet, IanAndOutGraphStageLogic)
toSetHandlers()
๐ Changes
Akka
- ๐ Add dual targetting to support .NET 6.0
All
Akka.NET
packages are now dual targetting netstandard2.0 and net6.0 platforms, we will be integrating .NET 6.0 better performing API and SDK in the future. - ๐ Add
IThreadPoolWorkItem
support toThreadPoolDispatcher
- ๐ Add
ValueTask
support toPipeTo
extensions - ๐ Add
CancellationToken
support toCancelable
- Fix long starting loggers crashing
ActorSystem
startup All loggers are asynchronously started duringActorSystem
startup. A warning will be logged if a logger does not respond within the prescribedakka.logger-startup-timeout
period and will be awaited upon in a detached task until theActorSystem
is shut down. This have a side effect in that slow starting loggers might not be able to capture all log events emmited by theEventBus
until it is ready.
Akka.Cluster
- โฑ Fix
ChannelTaskScheduler
to work with Akka.Cluster, ported from 1.4 - ๐ Harden
Cluster.JoinAsync()
andCluster.JoinSeedNodesAsync()
methods - ๐ง Fix
ShardedDaemonProcess
should use lease, if configured - Make
SplitBrainResolver
more tolerant to invalid node records - Enable
Heartbeat
andHearbeatRsp
message serialization and deserialization By default,Akka.Cluster
will now use the newHeartbeat
andHartbeatRsp
message serialization/deserialization that was introduced in version 1.4.19. If you're doing a rolling upgrade from a version older than 1.4.19, you will need to setakka.cluster.use-legacy-heartbeat-message
to true.
Akka.Cluster.Sharding
- Make Cluster.Sharding recovery more tolerant against corrupted persistence data
- Major reorganization to Akka.Cluster.Sharding
โฌ๏ธ The Akka.Cluster.Sharding changes in Akka.NET v1.5 are significant, but backwards compatible with v1.4 and upgrades should happen seamlessly.
Akka.Cluster.Sharding's
state-store-mode
has been split into two parts:- CoordinatorStore
- ShardStore
๐ง Which can use different persistent mode configured via
akka.cluster.sharding.state-store-mode
&akka.cluster.sharding.remember-entities-store
.Possible combinations:
state-store-mode remember-entities-store CoordinatorStore mode ShardStore mode 0๏ธโฃ persistence (default) - (ignored) persistence persistence ddata ddata ddata ddata ddata eventsourced (new) ddata persistence ๐ There should be no breaking changes from user perspective. Only some internal messages/objects were moved. ๐ง There should be no change in the
PersistentId
behavior and default persistent configuration (akka.cluster.sharding.state-store-mode
)๐ This change is designed to speed up the performance of Akka.Cluster.Sharding coordinator recovery by moving
remember-entities
recovery into separate actors - this also solves major performance problems with theddata
recovery mode overall.The recommended settings for maximum ease-of-use for Akka.Cluster.Sharding going forward will be:
akka.cluster.sharding{ state-store-mode = ddata remember-entities-store = eventsourced }
0๏ธโฃ However, for the sake of backwards compatibility the Akka.Cluster.Sharding defaults have been left as-is:
akka.cluster.sharding{ state-store-mode = persistence # remember-entities-store (not set - also uses legacy Akka.Persistence) }
Switching over to using
remember-entities-store = eventsourced
will cause an initial migration of data from theShardCoordinator
's journal into separate event journals going forward - this migration is irreversible without taking the cluster offline and deleting all Akka.Cluster.Sharding-related data from Akka.Persistence, so plan accordingly.Akka.Cluster.Tools
- ๐ Add typed
ClusterSingleton
support - ๐ Singleton can use
Member.AppVersion
metadata to decide its host node during hand-overAkka.Cluster.Singleton
can useMember.AppVersion
metadata when it is relocating the singleton instance. When turned on, new singleton instance will be created on the oldest node in the cluster with the highestAppVersion
number. You can opt-in to this behavior by settingakka.cluster.singleton.consider-app-version
to true.
Akka.Persistence.Query
Akka.Remote
- Fix typo in HOCON SSL settings. Backward compatible with the old setting names
- Treat all exceptions thrown inside
EndpointReader
message dispatch as transient, Ported from 1.4 - Fix SSL enable HOCON setting
Akka.Streams
- Allow GroupBy sub-flow to re-create closed sub-streams, backported to 1.4
- Fix ActorRef source not completing properly, backported to 1.4
- Rewrite
ActorRefSink
as aGraphStage
- Add stream cancellation cause upstream propagation, ported from 1.4
- Fix
VirtualProcessor
subscription bug, ported from 1.4 - ๐จ Refactor
Sink.Ignore
signature fromTask
toTask<Done>
- Add
SourceWithContext.FromTuples()
operator` - Add
GroupedWeightedWithin
operator - Add
IAsyncEnumerable
source
โ Akka.TestKit
- ๐ฆ Deprecated/removed Akka.DI package
Please use the new