Skip to content

makeEventBus

makeEventBus<A>(options): Effect<EventBus<A>, never, Scope>

Defined in: packages/core/src/events.ts:31

A two-lane event bus.

The previous implementation used PubSub.unbounded for every gateway and Slack event, so a slow subscriber could grow memory without bound. Critical events keep that guarantee because losing an interaction is worse than memory pressure; high-volume state dispatches use a sliding buffer that keeps the newest events. The merge does not promise ordering between the two lanes; each lane keeps its own order and interactions are handled before they are published.

A

EventBusOptions<A>

Effect<EventBus<A>, never, Scope>