Expand description
faucet dlq — inspect, replay, and discard dead-letter-queue envelopes.
The DLQ subsystem writes a fixed-shape envelope (faucet_core::dlq) for
every quarantined row. This module closes the loop: read those envelopes
back, group them by why they failed, re-feed the original payloads through
the referenced pipeline (transforms → quality → contract → sink), and
archive/delete what’s been handled.
Orchestration only — it produces serializable result structs and does IO,
but never prints. The CLI command layer (crate::commands::dlq) renders
them for the terminal; faucet serve renders them as JSON.
Modules§
- plan
- Pure planning for
faucet dlq— validate a reason filter, derive the fresh “replay-failed” DLQ location, build the replayExpandedNode, and decide per-line discard actions. Kept free of IO so it is exhaustively unit-testable; the IO shims live inmodandreader. - reader
- Read a DLQ location (a local JSONL file, a directory of
*.jsonl, or a glob) back into DLQ envelopes, and expose it as aSourcesofaucet dlq replaycan feed the unwrapped original payloads through the normal pipeline path.
Structs§
- Discard
Outcome - Outcome of a
discardrun. - Envelope
Summary - A compact, serializable view of one envelope for the
inspectsample. - Inspect
Summary - Grouped summary of a DLQ location, produced by
inspect. - Replay
Inputs - Inputs for a
replayrun beyond the config + location. - Replay
Outcome - Outcome of a
replayrun.
Functions§
- discard
- Discard (archive or delete) DLQ envelopes matching a reason / age filter.
- inspect
- Read a DLQ location back and group its envelopes by reason and error kind,
with a bounded sample.
reasonrestricts the included envelopes; malformed and non-envelope line counts always reflect the whole scan. - replay
- Reconstruct a pipeline whose source is the DLQ location (envelopes →
unwrapped payloads) and whose sink/transforms/quality/contract come from
cfg, then run it through the normal executor path. Replayed rows that fail again land in a fresh DLQ so replay can never re-feed itself.