FerroFeed
Redis sink example
Emit normalized md:v1 events for reader applications.
The Redis sink is the common handoff from FerroFeed into analytics and replay
systems. It writes normalized EmittedEvent payloads under session-keyed
md:v1 streams.
[runtime]
ui = "none"
[[venues]]
id = "coinbase-btcusd"
exchange = "coinbase"
symbols = ["BTC-USD"]
channels = ["trades", "book"]
[[sinks]]
type = "redis"
url = "redis://127.0.0.1:6379"
key_prefix = "md:v1"Each emitted record preserves the venue id, normalized exchange, symbol,
exchange timestamp when supplied, local ingest timestamp, and typed event kind.
Reader applications should treat the Redis payload as the serialized transport
for the EmittedEvent API contract.
use ferro_feed::model::{EmittedEvent, EventKind};
fn handle(event: EmittedEvent) {
if let EventKind::Trade(trade) = event.event.kind {
println!(
"{} {} {} @ {}",
event.venue_id,
event.event.symbol,
trade.qty,
trade.price
);
}
}