Skip to content

Actor4j

Create reactive or agentic applications using actors as a building block. One SDK, four runtimes — choose the execution model that fits your workload, without changing your code.

Actor model oriented

Actors are lightweight and collaborate through asynchronous messaging for a common goal. Data is shared by immutable messages.

Multi-runtime

Default (thread-bound), classic (work-stealing pool), Loom (one virtual thread per actor) and hybrid (combining default and classic). Write actors once against the SDK, run them on every runtime.

Lean by design

No external dependencies (apart from runtime-extended), Java 21+, ready for GraalVM native images.

What does your workload look like?

Default runtime — Thread-bound queues. Actors of a group share a thread, messages between them need no synchronization.

<dependency>
    <groupId>io.actor4j</groupId>
    <artifactId>actor4j-core-runtime</artifactId>
    <version>2.5.0-beta.1</version>
</dependency>

The actors stay the same: they are written against actor4j-core-sdk, only the dependency changes.

Actor4j - Core 2.5.0-beta.1 is available on Maven Central. New is the hybrid runtime: thread-bound actors and a work-stealing pool in one actor system, placement per actor. Also new: StatefulResourceActor / StatelessResourceActor, resource actors on virtual threads (virtualResourceThreads) and a configurable number of timer threads (timerThreads).