Eventbus
The Event Bus carries temporary JSON messages between applications connected to one Stardust mount. It uses the same LSP connection as queries and other SDK operations. Applications can notify a user interface, coordinate a worker, or exchange streaming results without creating a fact for each message.
Facts provide recovery
The Event Bus does not keep messages or replay missed deliveries. An application must record information that needs to survive as facts before it publishes a related event. A consumer can then read those facts after a notification or connection failure.
Publication has no server response. SDK success means the client sent the message, not that a consumer received it. A full delivery queue drops that delivery without delaying other subscribers or the publisher. Use a durable work system when the application requires acknowledgments or guaranteed delivery.
Subjects select consumers
A publisher uses a literal subject, such as orders/created.
A subscription uses a regular expression that matches the complete subject.
Thus orders/.* matches orders/created, while created does not.
Applications select subject names and payload shapes for their own needs.
A subscription belongs to its LSP session. Cancellation or session closure removes it. Raw publications can contain any JSON value.
Requests select one worker
Event RPC connects one caller to the earliest matching live worker registration. The caller selects a mode and a literal subject. The worker registers the same mode with a subject pattern. An exchange cannot open without a matching worker.
| Mode | Caller sends | Worker sends |
|---|---|---|
request | One request | One response |
push | A stream, then finish | One response |
pull | One request | A stream, then finish |
duplex | A stream, then finish | A stream, then finish |
Each exchange has session-owned handles. Finishing closes one send direction and allows remaining responses to arrive. Cancellation closes both directions. A connection failure cancels its exchanges, so an exchange cannot resume on a new connection.
Definitions check message shapes
A definition under definitions/events/<mode>/<subject> contains request and response JSON Schemas.
An exchange keeps the definition from the time it opens.
Each message must conform to the applicable schema, even if the definition changes during the exchange.
An undefined route remains available through the dynamic API without schema checks.
The fixed mode folders need no separate entity creation. A definition appears after its first valid document write. Generated SDK methods provide typed access to defined routes. The shared Event Bus reference describes the methods and message shapes.
Commit notifications identify changed data
Stardust sends stardust/entitiesChanged after a changed commit.
The notification identifies affected entity IDs and whether the commit created an entity.
A slow consumer can miss intermediate notifications, so the notification is a signal to read current facts.
The transaction history contains the committed changes.
Live queries use their own subscriptions to give complete results after affecting commits. These subscriptions reduce repeated application queries while durable facts remain the source for recovery.