Skip to main content

createMemoryEventBus

@forge/monorepo


@forge/monorepo / backend/src / createMemoryEventBus

Function: createMemoryEventBus()

createMemoryEventBus(): object

Defined in: backend/src/runtime/streaming.ts:95

In-memory event bus: a RealtimePublisher paired with a LiveEventSource. Each subscriber gets its own queue that starts filling the moment it subscribes, so openRunEventStream never races. Serves tests, single-process deployments and the SSE embedded profile (#37).

Returns

object

live

live: LiveEventSource

publisher

publisher: RealtimePublisher