Pular para o conteúdo
Português (BR)

MessageBoundaryCheck

Este conteúdo não está disponível em sua língua ainda.

Defined in: src/diagnostics/MessageBoundaryCheck.ts:60

Every local tell held to the boundaries a message meets in production (#1386).

In-process delivery hands the receiver the very object the sender built — prototype intact, methods working, functions callable. A worker hop structured-clones it: a class instance arrives as a plain object, silently, and a function-valued field does not arrive at all. A cluster wire runs it through a serializer, which needs a binding for the class. The suite of an application exercises the first path almost exclusively, so a message type can be green locally and degrade the first time actor-ts.parallelism.workers is switched on. This check makes the local path answer for the others: with a mode on, the message is examined at tell time the way the boundary would examine it, and what would be lost is reported — with the type and the recipient — while there is still a stack to report it on.

Two independent switches, because they catch different defects: the structured-clone half a silent degradation, the serializer half a hard failure. Off, the check does not exist — ActorSystem keeps null and postUserEnvelope pays one comparison.

new MessageBoundaryCheck(host, options): MessageBoundaryCheck

Defined in: src/diagnostics/MessageBoundaryCheck.ts:66

MessageBoundaryHost

MessageBoundaryOptionsType

MessageBoundaryCheck

readonly serializerRoundTrip: MessageBoundaryMode

Defined in: src/diagnostics/MessageBoundaryCheck.ts:62


readonly structuredClone: MessageBoundaryMode

Defined in: src/diagnostics/MessageBoundaryCheck.ts:61

check(message, recipient): void

Defined in: src/diagnostics/MessageBoundaryCheck.ts:86

Examine one message on its way to recipient. Framework messages and anything bound for the /system tree are exempt: the framework’s own classes cross their boundaries by their own mechanisms, and a system actor is never the far side of a worker hop.

unknown

ActorPath

void


static isEnabled(options): boolean

Defined in: src/diagnostics/MessageBoundaryCheck.ts:75

Whether either mode is on — the system builds no check otherwise.

MessageBoundaryOptionsType

boolean