Expand description
File and stdio stream implementation of the RustStream broker contract, built on
sea-streamer.
The gap this crate fills: running a service against a persistent stream without an
external broker. Two transports in one crate, over
sea-streamer-file and
sea-streamer-stdio:
FileBroker- a persistent, replayable stream on disk: survives restarts, records and replays, and repositioning is first-class -FileSubscriberimplements the framework’sSeekablecapability with pinned captured positions (a sequence rewind is inclusive) plus beginning/end/timestamp forms.StdioBroker- standard input and output as one stream, so a service becomes a stage of a shell pipeline; something no network broker can offer.
Honest scope: the client keeps no consumer positions (its resumable mode is
unimplemented upstream), so acknowledgement reports
AckError::Unsupported on both transports - resume
explicitly via the descriptor’s start position or a captured FilePosition. Payloads
are plain bytes with no header space, so user headers travel in a text-safe envelope
applied only when headers are present - a file written without headers stays readable as
a plain payload stream by other tools. The file transport does not build on Windows (an
upstream constraint).
Structs§
- Connected
File Broker - The typed witness that
connectsucceeded: the file is open. - Connected
Stdio Broker - The typed witness that
connectsucceeded. - File
Broker - A persistent, replayable stream on disk for the
RustStreammessaging framework: what survives restarts, records for replay, and needs no external broker. - File
Publish - The publish policy for
FilePublisher. - File
Publisher - Publishes messages into the stream file.
- File
Seeker - Repositions a
FileSubscriberwhile its stream runs; minted bySeekable::seeker. - File
Stream - A subscription descriptor for one stream key in the file.
- File
Subscriber - A subscription to one stream key in the file; yields
SeaMessages. - SeaMessage
- A message delivered by one of this crate’s subscribers.
- Stdio
Broker - Standard input and output as one stream: consume lines from stdin, publish lines to
stdout, in the client’s
[timestamp | stream_key | seq] payloadline format. - Stdio
Publish - The publish policy for
StdioPublisher. - Stdio
Publisher - Publishes messages to standard output.
- Stdio
Subscriber - A subscription to one stream key on standard input; yields
SeaMessages.
Enums§
- File
Position - A position in a stream file’s retained log, accepted by
Seeker::seek. - SeaFile
Error - Errors returned by the file and stdio transports.
Constants§
- SEQUENCE_
HEADER - Header exposing the message’s sequence number within its stream.