Expand description
Bounded fan-out broadcaster source (Broadcaster<T>).
Bounded fan-out broadcaster source.
Broadcaster<T> turns “observe a backend” into a bounded,
cancellable stream of typed events fanned out to many independent subscribers.
Each subscriber owns a private bounded channel:
a subscriber that falls further behind than the buffer loses interim events (backpressure by drop)
but never blocks the broadcaster or its peers.
Disconnected subscribers are pruned lazily on the next broadcast.
This is the canonical owner for the “watch a source → typed change stream” shape that recurs across config reloads, service discovery, cache invalidation, and secret rotation. Consumers that must not miss events should treat any received item as a signal to re-run their full load pipeline.
Structs§
- Broadcaster
- A bounded, cancellable fan-out broadcaster.
Constants§
- DEFAULT_
BROADCAST_ BUFFER - Default per-subscriber buffer used by
Broadcaster::new.
Type Aliases§
- Broadcast
Stream - A bounded, owned, cancellable stream of broadcast events.