Skip to main content

Module bus

Module bus 

Source
Expand description

In-process broadcast buses for market events and signals.

Both buses are thin wrappers around tokio::sync::broadcast with framework-appropriate defaults. The broadcast pattern suits this use case: we have one producer (the market feed) and multiple consumers (brain, logger, metrics exporter, persistence layer).

§Sizing

Broadcast channels drop oldest messages when a slow consumer falls behind. The default capacity of 1024 is generous — consumers should be fast, but a brief stall (e.g. GC pause, disk flush) won’t lose data.

Structs§

MarketDataBus
Broadcast channel for normalized market-data events.
SignalBus
Broadcast channel for trading signals.