Skip to content

ActorSystem

Defined in: src/ActorSystem.ts:48

The ActorSystem is the top-level container for actors. It owns the root guardians, the event stream, the scheduler, and the default dispatcher. Create one per logical application.

readonly config: Config

Defined in: src/ActorSystem.ts:56

Full merged configuration in effect for this system.


readonly deadLetters: ActorRef

Defined in: src/ActorSystem.ts:54


readonly dispatcher: Dispatcher

Defined in: src/ActorSystem.ts:50


readonly eventStream: EventStream

Defined in: src/ActorSystem.ts:52


readonly extensions: Extensions

Defined in: src/ActorSystem.ts:58

Per-system extension registry (serialization, sharding, pubsub, …).


readonly log: Logger

Defined in: src/ActorSystem.ts:53


readonly name: string

Defined in: src/ActorSystem.ts:49


readonly scheduler: Scheduler

Defined in: src/ActorSystem.ts:51

get isTerminated(): boolean

Defined in: src/ActorSystem.ts:175

boolean

actorOf<T>(props, name?): ActorRef<T>

Defined in: src/ActorSystem.ts:117

Spawn a top-level user actor under /user.

T

Props<T>

string

ActorRef<T>


actorSelection(path): ActorSelection

Defined in: src/ActorSystem.ts:130

Build an ActorSelection that resolves a path at lookup time. Accepts

  • a fully-qualified URI (“actor-ts://sys/user/foo/bar”)
  • an absolute path (“/user/foo/bar” or “user/foo/bar”) Wildcards are not supported in v1.

string

ActorSelection


extension<T>(id): T

Defined in: src/ActorSystem.ts:112

Convenience shortcut for system.extensions.get(id) — the one-liner used throughout the codebase to resolve an extension by its id.

T extends Extension

ExtensionId<T>

T


stop(ref): void

Defined in: src/ActorSystem.ts:154

Stop any actor by reference. Returns a promise that resolves once it is fully terminated.

ActorRef

void


terminate(): Promise<void>

Defined in: src/ActorSystem.ts:159

Shut down: stops /user (children first) and resolves once everything is drained.

Promise<void>


whenTerminated(): Promise<void>

Defined in: src/ActorSystem.ts:168

Promise that resolves when the system has finished shutting down.

Promise<void>


static create(name?, settings?): ActorSystem

Defined in: src/ActorSystem.ts:104

Create a new actor system.

string = 'default'

ActorSystemSettings = {}

ActorSystem