Expand description
An in-memory typed publish/subscribe event bus.
BroadcastBus implements the core EventBus trait
over a bounded broadcast channel: every event published is delivered to every
current subscriber. Producers such as sensors and transports publish events,
and consumers await them, all statically typed to one event type per bus.
The bus is bounded, so a subscriber that falls far enough behind drops the events it missed and resumes from the most recent ones. This keeps a slow consumer from holding memory without bound, which matters on constrained devices.
Structsยง
- Broadcast
Bus - A typed publish/subscribe bus that broadcasts each event to all subscribers.