Developer experience improvements in Akka Libraries 25.05
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:
- Akka core 2.10.x
- Akka HTTP 10.7.x
- Akka gRPC 2.5.x
- Akka Management 1.6.x
- Alpakka Kafka 7.0.x
- Alpakka 9.0.x
- Akka Persistence R2DBC 1.3.x
- Akka Persistence DynamoDB 2.0.x
- Akka Persistence JDBC 5.5.x
- Akka Persistence Cassandra 1.3.x
- Akka Projections 1.6.x
- Akka Diagnostics 2.2.x
- Akka Insights 2.21.x
We hope you enjoy the improvements and stay tuned for future releases!
Posts by this author