Skip to content

From Apache Pekko

Apache Pekko is the community fork of Akka that the Apache Software Foundation created when Akka changed its licensing in 2022. Pekko maintains the Akka 2.6 API under Apache 2.0 license; future Akka is proprietary.

For migration purposes, Pekko ≈ Akka 2.6 — everything in the from-akka-jvm guide applies. This page covers the Pekko-specific differences.

Pekko is a drop-in replacement for Akka 2.6 with one notable change: all package names changed from akka.* to org.apache.pekko.*.

// Akka:
import akka.actor.Actor
import akka.cluster.sharding.ClusterSharding
// Pekko:
import org.apache.pekko.actor.Actor
import org.apache.pekko.cluster.sharding.ClusterSharding

Otherwise, the API is identical to Akka 2.6.

Treat your Pekko codebase exactly like Akka 2.6 — see from-akka-jvm for the full mapping.

The same conceptual cheatsheet applies:

Pekkoactor-ts
ActorActor<TMsg>
ActorRefActorRef<T>
ClusterCluster
ClusterShardingClusterSharding
PersistentActorPersistentActor
ClusterSingletonManagerClusterSingletonManager

Pekko is Apache 2.0 — actor-ts is also permissively licensed. No license conflicts during migration.

Just like Akka Streams: not ported. Use Promise-based patterns or a separate library.

Pekko HTTP → use the framework’s HTTP module

Section titled “Pekko HTTP → use the framework’s HTTP module”

actor-ts’s HTTP module covers the common Pekko HTTP use cases — routing, marshalling, middleware. Less feature-complete (no compile-time-typed route DSL like Pekko HTTP’s), but simpler.

Pekko Persistence Query → PersistenceQuery

Section titled “Pekko Persistence Query → PersistenceQuery”

actor-ts has PersistenceQuery with the same conceptual shape (live + snapshot queries by pid or tag), but exposed as AsyncIterable instead of Stream.

Same as for Akka:

  1. Don’t rewrite everything at once — run actor-ts in a new service fronting the Pekko system.
  2. One bounded context at a time — migrate per-domain.
  3. Re-export persistence carefully — Pekko’s JSON-Jackson events read into actor-ts via an EventAdapter.

If Pekko works for you, don’t migrate — the use case for actor-ts is:

  • You want a TypeScript-first stack rather than JVM.
  • Your deployment is container-first with sub-second startup matters.
  • You’d rather avoid the JVM for operational reasons (memory profile, GC tuning).

If none of those apply, Pekko is a solid choice on the JVM — stick with it.