Skip to main content

Module embedded

Module embedded 

Source
Expand description

The embedded file-backed broker โ€” the Bridge reference backend.

Layout: <data_dir>/manifest.yaml + per partition under <data_dir>/topics/<topic>/: p<N>.jsonl (the JSONL segment), p<N>.next-offset (durable high-water mark), and p<N>.event-uids.jsonl (idempotency sidecar). Offsets are stable logical positions: retention rewrites keep surviving records under their original offsets, so after expiry the first file line can carry an offset > 0. Segment appends are serialized per partition; a crash can leave at most one torn trailing line, which recovery detects, truncates, and counts (never silently absorbs โ€” D13.16). A torn sidecar tail is truncated without counting and rebuilt from the recovered segment.

Scope: single-process access (the harness embeds the broker or fronts it). Cross-process multi-writer setups use the NATS/Kafka connectors.

Structsยง

EmbeddedBroker
File-backed broker instance.