コンテンツにスキップ
日本語

ActorOptionsType

このコンテンツはまだ日本語訳がありません。

ActorOptionsType<TMessage> = object

Defined in: src/ActorOptions.ts:44

Plain options-object shape accepted wherever an actor is spawned.

TMessage = unknown

readonly optional dispatcher?: Dispatcher

Defined in: src/ActorOptions.ts:53

Run this actor on a different dispatcher than the system’s.


readonly optional displayName?: string

Defined in: src/ActorOptions.ts:100

Human-readable name for log lines and the DevTools tree (#891) — the spawn-site counterpart to overriding Actor.displayName(), for a framework-constructed actor with no subclass of your own: a Behaviors actor, a sharded entity, a singleton.

Outranks the method, exactly as supervisorStrategy outranks Actor.supervisorStrategy(). Purely cosmetic — the path stays the identity everywhere that routes or correlates.


readonly optional entity?: EntityContext

Defined in: src/ActorOptions.ts:110

Spawn this actor as a sharded entity with the given identity, readable back off this.entityId / this.context.entity.

ClusterSharding sets this itself for every entity a shard creates. It is public for the test bench: an entity that derives its persistenceId from this.entityId is otherwise unspawnable without a cluster standing behind it.


readonly optional internal?: boolean

Defined in: src/ActorOptions.ts:89

This actor belongs to the tooling, not to the application.

Whole-system instrumentation skips it, which is what keeps a debugger from observing itself: DevTools’ own hub publishes the spans it just recorded, so tracing it feeds its own output back in. Children inherit the mark — a tooling actor’s children are tooling.


readonly optional mailbox?: MailboxFactory<TMessage>

Defined in: src/ActorOptions.ts:80

Custom mailbox — PriorityMailbox, or a BoundedMailbox configured beyond what mailboxCapacity / mailboxOverflow express, or a Mailbox subclass of your own. Omit for the default unbounded FIFO queue.

Drops still reach actor_mailbox_dropped_total: the cell registers its observer on whatever you return, provided the mailbox implements DropReportingMailbox (BoundedMailbox does). Any onDrop of your own keeps firing alongside it.


readonly optional mailboxCapacity?: number

Defined in: src/ActorOptions.ts:61

Bound this actor’s mailbox at mailboxCapacity queued user messages. Unset means unbounded, which is the default — so setting this is the act that introduces message loss, and mailboxOverflow decides which message is lost. Cannot be combined with mailbox, which brings its own bound.


readonly optional mailboxOverflow?: BoundedMailboxOverflow

Defined in: src/ActorOptions.ts:68

What a full mailbox does with an arriving message. Only meaningful together with mailboxCapacity — an unbounded mailbox is never full — so setting it alone is rejected rather than silently ignored. Defaults to DEFAULT_MAILBOX_OVERFLOW.


readonly optional supervisorStrategy?: SupervisorStrategy

Defined in: src/ActorOptions.ts:51

How the parent handles this actor’s failures. Distinct from the supervisorStrategy() override inside the actor class, which governs its children. Set here, a single child opts out of its parent’s policy without affecting its siblings.