github akkadotnet/akka.net v1.3.9
Akka.NET v1.3.9 Stable Release

latest releases: 1.5.26, 1.5.25, 1.5.24...
5 years ago

1.3.9 August 22 2018

Maintenance Release for Akka.NET 1.3

Akka.NET v1.3.9 features some major changes to Akka.Cluster.Sharding, additional Akka.Streams stages, and some general bug fixes across the board.

Akka.Cluster.Sharding Improvements
The Akka.Cluster.Sharding documentation already describes some of the major changes in Akka.NET v1.3.9, but we figured it would be worth calling special attention to those changes here.

Props Factory for Entity Actors

In some cases, the actor may need to know the entityId associated with it. This can be achieved using the entityPropsFactory parameter to ClusterSharding.Start or ClusterSharding.StartAsync. The entity ID will be passed to the factory as a parameter, which can then be used in the creation of the actor.

In addition to the existing APIs we've always had for defining sharded entities via Props, Akka.NET v1.3.9 introduces a new method overload for Start and StartAsync which allows users to pass in the entityId of each entity actor as a constructor argument to those entities when they start.

For example:

var anotherCounterShard = ClusterSharding.Get(Sys).Start(
	                        typeName: "AnotherCounter",
	                        entityProps: Props.Create<AnotherCounter>(),
	                        typeName: AnotherCounter.ShardingTypeName,
	                        entityPropsFactory: entityId => AnotherCounter.Props(entityId),
	                        settings: ClusterShardingSettings.Create(Sys),
	                        extractEntityId: Counter.ExtractEntityId,
	                        extractShardId: Counter.ExtractShardId);

This will give you the opportunity to pass in the entityId for each actor as a constructor argument into the Props of your entity actor and possibly other use cases too.

Improvements to Starting and Querying Existing Shard Entity Types
Two additional major usability improvements to Cluster.Sharding come from some API additions and changes.

The first is that it's now possible to look up all of the currently registered shard types via the ClusterSharding.ShardTypeNames property. So long as a ShardRegion of that type has been started in the cluster, that entity type name will be added to the collection exposed by this property.

The other major usability improvement is a change to the ClusterSharding.Start property itself. Historically, you used to have to know whether or not the node you wanted to use sharding on was going to be hosting shards (call ClusterSharding.Start) or simply communicated with shards hosted on a different cluster role type (call ClusterSharding.StartProxy). Going forward, it's safe to call ClusterSharding.Start on any node and you will either receive an IActorRef to active ShardRegion or a ShardRegion running in "proxy only" mode; this is determined by looking at the ClusterShardingSettings and determining if the current node is in a role that is allowed to host shards of this type.

Akka.Streams Additions and Changes
In Akka.NET v1.3.9 we've added some new built-in stream stages and API methods designed to help improve developer productivity and ease of use.

Other Updates, Additions, and Bugfixes

To see the full set of changes for Akka.NET v1.3.9, click here.

COMMITS LOC+ LOC- AUTHOR
28 2448 5691 Aaron Stannard
11 1373 230 zbynek001
8 4590 577 Bartosz Sypytkowski
4 438 99 Ismael Hamed
4 230 240 Sean Gilliam
2 1438 0 Oleksandr Bogomaz
1 86 79 Nick Polideropoulos
1 78 0 v1rusw0rm
1 4 4 Joshua Garnett
1 32 17 Jarl Sveinung Flø Rasmussen
1 27 1 Sam13
1 250 220 Maxim Cherednik
1 184 124 Josh Taylor
1 14 0 Peter Shrosbree
1 1278 42 Marc Piechura
1 1 1 Vasily Kirichenko
1 1 1 Samuel Kelemen
1 1 1 Nyola Mike
1 1 1 Fábio Beirão

Don't miss a new akka.net release

NewReleases is sending notifications on new releases.