Akka version for java 17

What is minimal akka version that I can use, using JDK 17 for compilation and runtime ?
Currently migrating our code from java 8 to java 17, and wish to upgrade major versions as little as possible.
Current we are working with:
akka_actor_2.12 2.5.17
akka_http_2.12 10.1.5
Thanks

We don’t officially support 17 quite yet, but we do have nightly tests running on JDK 17 for Akka 2.6, so latest (currently 2.6.19) is a good bet.

For some features JDK 17 needs additional flags opening up reflective access, we have not added those to the docs yet but you can see the flags here: akka/JdkOptions.scala at main · akka/akka · GitHub

Hi. Thanks a lot for the quick reply.
So is it reasonable to assume that official version for JDK 17 is going to be 2.6.X? (and not 2.7.X…)

Yes, not sure I’d say “official version for” but rather something like: starting from 2.6.19+ it is possible to run Akka on JDK 17. If any issues are found with 2.6.19+ on JDK 17 we’ll fix them in patch releases (but I think we would have found any such issues by now, given that we run our test suite nightly on JDK 17).

Ok. Cool.
Just few more things to wrap it up:

  1. What about akka-http? The latest version also pass tests for JDK 17?
  2. If we upgrade akka before java, the migration to latest should work on JDK 8, right?
  3. Does it matter whether we use _2.12 or _2.13 scala versions for JDK 17?
    Many thanks

Yes, Akka HTTP also has nightly tests on JDK 17, passing.

Akka 2.6.x supports JDK 8 and JDK 11, so migrating Akka first should work fine.

If you are using Java we recommend the _2.13 binaries. For Scala 2.13 would also be the recommendation since it is the 2.x Scala version actively being worked on.

1 Like