GoAkt is a distributed actor framework for Go that lets you build reactive systems with typed messages. It runs as a single process or a cluster of nodes behind the same API, and ships with the primitives (supervision, remoting, clustering, CRDTs, streams, observability) needed to put actor systems into production without re-rolling them yourself.
New to the actor model? Brian Storti's short introduction is a good starting point; the references at the end of that post go deeper.
- Actor model: concurrent actors with typed messages
- Grains: virtual actors with their own context and lifecycle
- Hierarchies: parent and child trees via
SpawnChild, with child-to-parent navigation - Lifecycle:
PreStart,PostStop, graceful stop, and poison-pill shutdown - Behavior switching:
BecomeandUnBecome, plus stackedBecomeStackedandUnBecomeStackedfor protocol phases - Messaging:
Tell,Ask,BatchTell, andBatchAskfor fire-and-forget, request-response, and bulk delivery - Forward and
PipeTo: forward messages preserving the original sender, and pipe async task results back to an actor - Reentrancy: non-blocking async
Requestwith configurable modes and in-flight limits - Stashing:
Stash,Unstash, andUnstashAllto defer messages during transient states - Watch and Terminated: monitor actor lifecycle and receive
Terminatedon death - PubSub: topic-based publish and subscribe via a dedicated
TopicActor, cluster-aware with cross-node dissemination over remoting - Mailboxes: unbounded FIFO, bounded, priority, and fair (segmented)
- Supervision: one-for-one and one-for-all strategies with
Stop,Resume,Restart, andEscalatedirectives, plus retry windows - Passivation: auto-stop idle actors via a time-based strategy
- Reinstate: bring a previously stopped actor back online by PID or name
- Circuit breaker:
PipeTointegrates thebreakerpackage to short-circuit calls to unhealthy dependencies - Dead letters: unhandled messages captured and published on the event stream
- Routers: round-robin, random, and fan-out strategies
- Timers:
ScheduleOnce, recurringSchedule, andScheduleWithCronfor cron-driven message delivery - Schedule lifecycle:
PauseSchedule,ResumeSchedule, andCancelScheduleon existing references
- Remoting: TCP actor communication across nodes with pluggable serializers (Proto, CBOR, and custom)
- TLS and mTLS: configurable transport security for remoting
- Discovery: Consul, etcd, Kubernetes, NATS, mDNS, and static
- Location transparency: address actors without knowing their node
- Relocation: automatic actor relocation on node failure
- Cluster singletons: single instance cluster-wide with guardian lifecycle
- Multi-datacenter: DC-transparent messaging, pluggable control plane (NATS JetStream, etcd), and DC-aware placement
- CRDTs:
GCounter,PNCounter,LWWRegister,MVRegister,ORSet,ORMap, andFlag, with delta replication, anti-entropy sync, tombstone deletion, and snapshots - Reactive streams: backpressure-aware processing with a composable DSL (
map,filter,flatMap,batch,throttle, fan-out and fan-in), stage fusion, and built-in metrics and tracing
- OpenTelemetry metrics, event stream, and dead letters
- Event stream: in-process topic-based publish and subscribe for system and user events
- Context propagation: pluggable propagation for request-scoped metadata
- Extensions: register system-wide capabilities with
WithExtensionson the actor system, then resolve them from any actor or grain viaExtensionon the receive context - Dependency injection: attach serializable dependencies to an actor at spawn time with
WithDependencies, accessed insideReceiveviaDependencyandDependencies; the actor system can alsoInjectdependency types for cluster-wide reconstruction on relocation
See Documentation for the full feature reference.
go get github.com/tochemey/goakt/v4See the examples repository for runnable code covering local, remote, and clustered actor systems.
Architecture documents: Architecture.
Benchmark suite: Benchmark.
GoAkt is free and open source. If you need priority support on complex topics or request new features, please consider sponsorship.
Applications using this library should routinely upgrade their Go version and refresh dependencies as needed to mitigate security vulnerabilities. GoAkt will make a best effort to keep dependencies current and perform vulnerability checks whenever necessary.
You can join these groups and chat to discuss and ask GoAkt related questions on:
We welcome contributions: bug fixes, new features, and documentation improvements. Before diving in, read the Architecture Document to understand the codebase. We use Conventional Commits and a Docker-backed Makefile so contributors only need Docker and Make installed; run make help to see the available targets.
See contributing.md for prerequisites, setup, and the full contribution workflow.
This framework is used in production by the following projects/companies:
- Baki Money: AI-powered expense tracking platform that turns receipts into stories.
- Event Processor: Clustered Complex Event Processor (CEP) for IoT data streams.
Share feedback on this tracking issue; it helps shape what we work on next.