API Reference
Dispatcher
Defined in: channels/dispatcher.ts:98
Turns submit(sessionId, message) calls into throttled runAgent runs.
See the module:channels/dispatcher | module docs for the model.
Accessors
inFlight
Get Signature
get inFlight(): number;Defined in: channels/dispatcher.ts:109
Runs currently in flight across all sessions.
Returns
number
Constructors
Constructor
new Dispatcher(options): Dispatcher;Defined in: channels/dispatcher.ts:103
Parameters
| Parameter | Type |
|---|---|
options | DispatcherOptions |
Returns
Dispatcher
Methods
stats()
stats(): DispatcherStats;Defined in: channels/dispatcher.ts:114
Aggregate backpressure readings — what an adaptive controller acts on.
Returns
submit()
submit(sessionId, ...messages): void;Defined in: channels/dispatcher.ts:135
Enqueue one or more messages for a session and ensure it is being pumped. Non-blocking: always returns immediately so the caller (a socket handler) can keep draining its transport. Backpressure is applied at the buffer, never here.
Parameters
| Parameter | Type | Description |
|---|---|---|
sessionId | string | The session/thread the messages belong to. |
...messages | Message[] | The inbound message(s). |
Returns
void