Blog

Developer experience improvements in Akka Libraries 25.05

Written by Kevin Hoffman | May 9, 2025 1:18:23 AM

Attention Akkatects.

We recently released Akka Libraries 25.05 and are excited to get it into the hands of developers. This release has quite a few enhancements but the most notable are those that improve the overall developer experience.

Highlights: Developer experience improvements

Virtual threads are here!

Java virtual threads (which originated in project loom) are a new, long-awaited feature that arrived with JVM version 21. Virtual threads are lightweight threads (often called “coroutines” or “green threads” in other language ecosystems) that make it easier and less error-prone to write, maintain, and debug high-throughput, concurrent applications. This feature is tailor-made for a platform like Akka.

To enable the virtual thread executor in Akka, you can use the following configuration:

akka.actor.default-blocking-io-dispatcher {
    executor = "virtual-thread-executor"
}

For more details on Akka’s use of blocking code, check out the relevant documentation.

With the virtual thread executor, there might finally be such a thing as a free lunch.

Storing metadata on events

You can now store additional metadata on an event and have it persisted with the same guarantees as regular events persisted by Event Sourced entities. You can persist metadata with the new persistWithMetadata  effect and you can read that metadata with the getMetadata function.

Often when building and architecting event-sourced systems, we need to store metadata with an event that isn’t necessarily part of the pure business domain of that event. For example, when we use random number generation in an event-sourced application, we might want to also store the random seed that was used in generation. Other times we might need to store agentic AI metadata like the number of tokens used in an LLM interaction or prompt context and conversation metadata.

Prior to this release you had to add those fields directly to the event. It’s a matter of personal preference whether you like this approach, but now you can add metadata to the event without it appearing as part of the core set of domain fields.

Other improvements

In no particular order, here are some of the other improvements shipped with this release:

  • API for calculating exponential backoff
  • New retry settings API
  • Restart flow logging tuning options
  • Java API for invoke with feedback in stream graph stages
  • Default request headers for gRPC clients
  • gRPC client retries using the new retry settings API
  • Multiple improvements for R2DBC projection queries
  • Multiple improvements for DynamoDB projections

Module versions

The availability of the Akka libraries 25.05 release sets a new baseline of Akka library versions that go together. Akka 25.05 consists of the following module versions:

We hope you enjoy the improvements and stay tuned for future releases!