Infrastructure Messages
Since v3.5 the bus is a message-driven system: every mutation of the bus itself — registration, middleware, locking, namespaces — is performed by executing a built-in infrastructure message through postboy.exec(...). The corresponding convenience methods on PostboyService (lock, unlock, addMiddleware, removeMiddleware, addNamespace, eliminateNamespace, unregister) were removed.
Two consequences worth knowing:
Infrastructure messages are regular executors: they declare their own static
IDand run through theExecutestage of the middleware pipeline. A domain-gating middleware should filter them out withcanHandle.Everything scriptable on the bus composes the same way application commands do.
Overview
Group | Message | Purpose |
|---|---|---|
Registration |
| register a message subject (+ optional delivery pipe) |
Registration |
| register an executor handler function |
Registration |
| register an executor handler object |
Registration |
| unregister by static ID; completes the subject |
Pipeline |
| add/remove middleware (removal is by instance identity and calls |
Locking |
| mute/unmute a type's delivery |
Namespaces |
| create/tear down a namespaced registrator group |
Registration group
Covered in depth in Registration:
DisconnectMessage completes the registered Subject (subscriber streams end) and drops an executor handler registered under the same ID. Further fire/sub of the type throws.
Pipeline group
Adding the same instance twice runs its hooks twice. See Middleware.
Locking group
A locked type's delivery via fire and fireCallback is silently skipped: no error, no notification, registration and sub keep working, middleware hooks still run. Treat a locked message as a no-op, not an error — and never lock IDs you don't own: to their subscribers a locked type looks exactly like data loss.
Namespaces group
AddNamespace returns the created registrator (repeating the call with the same name returns the same instance). EliminateNamespace runs its down() — one DisconnectMessage per recorded ID. Namespaces scope lifecycle, not message identity; see Namespaces.
Removed service methods
Removed (≤3.4) | Replacement |
|---|---|
|
|
|
|
|
|
|
|
|
|
Exact signatures: API reference — infrastructure messages.
Next steps
Registration — the Connect messages in application context.
Middleware and Namespaces — the two groups they serve.