MessageBoundaryCheck
이 콘텐츠는 아직 번역되지 않았습니다.
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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MessageBoundaryCheck(
host,options):MessageBoundaryCheck
Defined in: src/diagnostics/MessageBoundaryCheck.ts:66
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”MessageBoundaryCheck
Properties
Section titled “Properties”serializerRoundTrip
Section titled “serializerRoundTrip”
readonlyserializerRoundTrip:MessageBoundaryMode
Defined in: src/diagnostics/MessageBoundaryCheck.ts:62
structuredClone
Section titled “structuredClone”
readonlystructuredClone:MessageBoundaryMode
Defined in: src/diagnostics/MessageBoundaryCheck.ts:61
Methods
Section titled “Methods”check()
Section titled “check()”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.
Parameters
Section titled “Parameters”message
Section titled “message”unknown
recipient
Section titled “recipient”Returns
Section titled “Returns”void
isEnabled()
Section titled “isEnabled()”
staticisEnabled(options):boolean
Defined in: src/diagnostics/MessageBoundaryCheck.ts:75
Whether either mode is on — the system builds no check otherwise.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”boolean
