Skip to main content

Module reader

Module reader 

Source
Expand description

Read a DLQ location (a local JSONL file, a directory of *.jsonl, or a glob) back into DLQ envelopes, and expose it as a Source so faucet dlq replay can feed the unwrapped original payloads through the normal pipeline path.

The line-parsing core (classify_line) is pure and unit-tested; file IO (scan_files) is a thin shim over it. A DLQ location may contain arbitrary lines (blank lines, non-faucet output), so parsing is tolerant: unparseable and non-envelope lines are skipped and counted, never fatal.

Structs§

DlqReaderSource
A Source over a DLQ location that yields the unwrapped original payloads (optionally filtered by reason), so a replay run feeds them through the referenced config’s transforms / quality / contract / sink.
ScanResult
Envelopes read from a DLQ location plus the tolerant-parse tallies.
SourceOverride
A pre-built source attached to a single ExpandedNode so the executor runs it instead of building one from the connector registry. Used only by faucet dlq replay, which runs exactly one invocation, so the source is taken once. Clone shares the same cell (cloning the node does not duplicate the source).

Enums§

LineOutcome
Outcome of classifying a single line of a DLQ location.

Functions§

classify_line
Classify one raw line. Pure — no IO. Blank lines are ignored; anything else is either an envelope, malformed JSON, or valid-but-not-an-envelope.
expand_location
Expand a DLQ location into the concrete local files to read.
reason_matches
Whether an envelope matches an optional reason filter. None matches everything; a legacy envelope with no reason field never matches an explicit filter.
scan_files
Read and classify every line of every file, collecting envelopes and tallies. Blank lines are ignored; malformed / non-envelope lines are counted but never abort the scan.