Expert talks delivered virtually on Nov 10 Register Here
From the creators of Akka, get technology enhancements, monitoring, and expert support with Akka Platform from Lightbend. Learn More

News & Articles

Full archive

April 03

2019

Akka 2.5.22 Released

Dear hakkers,

We are pleased to announce a new patch release of Akka 2.5. Great news, with this release we have declared the new Actor APIs (Akka Typed) and Artery ready for use in production, more about that below.

An API for a distributed lease (lock) has been added to a new module called Akka Coordination. The lease can be used with Cluster Sharding and Singleton, as well as Lightbend’s Split Brain Resolver for additional additional safety measures for split brain scenarios. More details below.

Some other notable improvements and bug fixes in 2.5.22 are:

  • Performance improvement of DNS resolution for SRV records 25948
  • Simplify backoff supervision API, thanks to @nvollmar, #26156
  • Rewrite Source.actorRef as GraphStage, thanks to @nvollmar, #25324
  • New shutdown reasons added to CoordinatedShutdown, #26570
  • Enable new serializer for ShardRegionStats that was added in 2.5.18, see rolling updates
  • Less restrictive pattern for matching SRV service names, #26332
  • Fix race condition in lazy sink on immediate failure, #25410
  • Rename startContextPropagation to asFlowWithContext and endContextPropagation to asFlow in FlowWithContext, similar for SourceWithContext, #26353
  • Switch to Scalafmt #26356

A total of 125 issues were closed since 2.5.21. The complete list can be found on the 2.5.22 milestone on github.

New Actor API (Akka Typed)

After much testing and intense development of a few important features we are confident that Akka Typed has the quality and performance to be used in production.

It’s still marked as may change, which means that API or semantics can change without warning or deprecation period. For Akka Typed we have iterated over the APIs for a long time so we don’t expect any major changes, but your feedback is very much welcome. Such changes, if any, will be collected and performed in Akka 2.6.0 rather than in upcoming 2.5.x patch versions. The APIs of Akka Typed will be fully stable in Akka 2.6.0. This will give you a good period of stability without having to worry about changes in each version. We will of course backport critical bug fixes.

Additions and changes:

  • Addition of message routers, see documentation, #25612
  • Support for deleting snapshots and events by introducing RetentionCriteria, see documentation, #24698
  • The way to declare when snapshots should be stored changed with the new RetentionCriteria, see snapshotting
  • Supervision when combining typed and typed actors changed. The default supervision for untyped actors is to restart where as for typed it is to stop. When combining untyped and and typed actors the default supervision is based on the default behavior of the child i.e. if an untyped actor creates a typed child, its default supervision will be to stop. If a typed actor creates an untyped child, its default supervision will be to restart.
  • Fix memory leak in watchWith, thanks to @longshorej, #26625
  • Prevent surprising ordering of unstashAll and side effects in EventSourcedBehavior by introducing EffectBuilder type, #26489
  • Use signals instead of callbacks in EventSourcedBehavior, #25428
  • Change signature of terminate, whenTerminated and getWhenTerminated in ActorSystem, #25647
  • New classes for SnapshotSelectionCriteria and SnapshotMetadata, #26536
  • Fix leak of timers when stopping, #26285
  • Handle exceptions, unhandled, stopped, and same in StashBuffer
  • More robust way to discard obsolete timer messages, #26556
  • Access to lastSequenceNr from EventSourcedBehavior, #25113
  • Support mutable state in EventSourcedBehavior, #25740

Artery

After some final scalability testing we can now declare Artery TCP ready to be used in production. In Akka 2.6.0 we will make the Artery TCP transport the default for actor messaging. See the short migration guide for how to switch. Classic remoting will be deprecated in 2.6.0 and removed earliest in 2.7.0.

Artery improves stability for systems using Akka Cluster and also has much better performance.

One thing to be aware of is that rolling update from classic remoting to Artery is not supported since the protocol is completely different. It will require a full cluster shutdown and new startup.

Distributed lease

The distributed lease can be used for additional additional safety measures for split brain scenarios in the following modules:

  • Lightbend’s Split Brain Resolver. An additional safety measure so that only one SBR instance can make the decision to remain up.
  • Cluster Singleton. A singleton manager can be configured to acquire a lease before creating the singleton.
  • Cluster Sharding. Each shard can be configured to acquire a lease before creating entity actors.

An implementation for Kubernetes is available for Lightbend customers.

Note that akka-coordination is a new transitive dependency from akka-cluster-sharding and akka-cluster-tools. When using a build tool such as sbt, Maven or Gradle this dependency will automatically be included, otherwise you need to add it if you use Cluster Sharding or Cluster Singleton.

Credits

For this release we had the help of 34 committers – thank you all very much!

commits  added  removed
     53  25442    21331 Patrik Nordwall
     28   3579      878 Johan Andrén
     20    521      283 Arnout Engelen
     18   2977      430 Christopher Batey
     13    952      869 Nicolas Vollmar
     12    837      271 Helena Edelson
      7     13        7 Yoel Garcia Diaz
      6    467       67 Luc Bourlier
      5    172       68 Gaël Bréard
      5     26      147 Johannes Rudolph
      5     26       22 Enno
      4     19        6 Varun Sivapalan
      2     36       16 Ignasi Marimon-Clos
      2     21       11 kerr
      2      3        9 Tim Moore
      2      3        3 Hungai Amuhinda
      1     86       86 Seth Tisue
      1     83       78 Heiko Seeberger
      1     91       62 Tzu-Chiao Yeh
      1     80       29 Renato Cavalcanti
      1     43       33 Yaroslav Klymko
      1     18       16 Jason Longshore
      1      9        9 Leandro
      1     11        6 daniperez
      1     12        2 Adriaan Groenenboom
      1      3        4 Dale Wijnand
      1      3        3 Yoel García Díaz
      1      2        2 zhongl
      1      4        0 James Roper
      1      1        1 Piotr Gawryś
      1      1        1 Vasilis Nicolaou
      1      1        1 Zili Chen
      1      1        1 Martynas Mickevičius
      1      1        1 Tomek Kopczynski

Thanks to Lightbend for their continued sponsorship of the Akka core team’s efforts. Lightbend offers commercial support for Akka.

Happy hakking!

– The Akka Team