Interface: BusSubscribeMessage
Makaio Framework / bus-core / BusSubscribeMessage
Interface: BusSubscribeMessage
Section titled “Interface: BusSubscribeMessage”Defined in: ../../../packages/bus-core/src/types/transports.ts:28
Subscribe message for client subscription management.
Supports both subject-based filtering (wildcards) and payload-based filtering (declarative filter specs). Both are applied server-side for smart-routing.
Priority arrays enable cross-transport priority-based dispatch: the receiver uses the arrays to populate its remote handler registry so that dispatch can consider handler priorities across process boundaries.
Example
Section titled “Example”// Request handler with priorities{ type: 'subscribe', subjects: { 'ui.navigate': [100, 200] } }
// Event-only handler (no priority-based dispatch){ type: 'subscribe', subjects: { 'session.created': [] } }Properties
Section titled “Properties”filters?
Section titled “filters?”
optionalfilters?:Record<string,PayloadFilter>
Defined in: ../../../packages/bus-core/src/types/transports.ts:51
Optional payload filters per subject. Key is the subject pattern, value is the filter to apply. Messages are only forwarded if payload matches the filter.
Example
Section titled “Example”{ subjects: { 'mcp.event': [] }, filters: { 'mcp.event': { agentId: 'agent-123' } }}subjects
Section titled “subjects”subjects:
Record<string,number[]>
Defined in: ../../../packages/bus-core/src/types/transports.ts:36
Subjects and their handler priorities.
Keys are subject patterns (can include wildcards like 'adapter.*').
Values are arrays of handler priorities registered for that subject.
An empty array indicates event-only handlers with no priority-based dispatch.
type:
"subscribe"
Defined in: ../../../packages/bus-core/src/types/transports.ts:29