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.
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.
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.
In no particular order, here are some of the other improvements shipped with this release:
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!