Expand description
atomr-streams. akka.net: src/core/Akka.Streams.
Source/Flow/Sink DSL built on top of futures::Stream. The surface
covers the linear operator set and the most common graph-DSL
junctions from upstream:
Source,Flow,Sink— core linear elements.- [
graph] —merge,broadcast,zip,concatjunctions. Framing— delimiter / length-field byte framing.FileIO,Tcp— I/O adapters.KillSwitch— external termination.RestartSource/RestartSettings— automatic resubscription.SourceQueue/Sink::queue— explicit backpressure handles.OverflowStrategy— bounded-buffer policies.BidiFlow— bidirectional composition.
The port delegates pipeline execution to futures_util::StreamExt; each
combinator builds a boxed stream closure that mirrors the corresponding
Akka.Streams operator.
Modules§
- deciders
- Conventional decider helpers.
Structs§
- Actor
Materializer - Bidi
Flow - Broadcast
Hub - Fan one source to many dynamic consumers.
- FileIO
- Flow
- Framing
- Graph
Dsl - Incoming
Connection - Kill
Switch - Merge
Hub - Fan many dynamic producers into one consumer source.
- Outgoing
Connection - Restart
Settings - Restart
Source - Runnable
Graph - Sink
- Sink
Queue - Sink
RefHandle - Consumer-side advertisement of a
Sink<T>. The producer attaches a source viaSinkRefHandle::attachwhich then pumps into the receiver-owned stream. - Source
- Source
Queue - Source
RefHandle - Producer-side advertisement of a
Source<T>. The owner pumps elements; consumers subscribe viaSourceRefHandle::take_source. - Tcp
Enums§
- Framing
Error - Overflow
Strategy - Queue
Offer Result - Supervision
Directive - What a
Deciderreturns for an error.
Functions§
- balance
balance(n)— round-robin one source intonoutputs.- broadcast
- akka.net:
Broadcast(2)— cheap fan-out into two independent sources using cloned items and a bounded channel per downstream. - concat
- akka.net:
Concat<T>— drain first source fully, then second. - count_
elements count_elements(src)— convenience: returns the source unchanged plus anArc<AtomicU64>that totals every element.- group_
by group_by(max_substreams, key_fn)— fan one source into N per-key substreams. Each new key yields a(key, Source<T>)pair on the returned outer source. Oncemax_substreamskeys are open, additional keys’ elements are dropped.- grouped_
within grouped_within(n, dur)— emitVec<T>chunks of up tonelements; flush early whendurelapses since the chunk’s first element. Akka.NET:Source.GroupedWithin(n, dur).- idle_
timeout idle_timeout(d)— complete the stream early if no element arrives ford. Akka.NET’s variant raises a typed exception; we surface “completed early” so a downstreamrecover_with/Sink::collect_with_statuscan disambiguate.- map_
error - Map the error variant via
f. BothOkandErrcontinue downstream; only theErrpayload type changes. - merge
- akka.net:
Merge<T>(interleaving, order not guaranteed). - merge_
all - akka.net:
Merge(sources)with arbitrary fan-in. - monitor
monitor(src, on_each)— invokeon_each(&item)for every element flowing through, without consuming or transforming it. Useful for telemetry instrumentation.- partition
partition(n, f)— fan one source intonoutput sources; each element is sent to the output picked byf(item). Out-of-range outputs are dropped.- recover
- Replace any
Err(e)withf(e)and continue, mapping the stream toT(success values are unwrapped). The first error stops the upstream — subsequent elements are dropped. - recover_
with - Replace the upstream’s tail with
replacementupon the firstErr(_). Pre-errorOk(_)values flow through unchanged. - split_
when split_when(pred)— split the source into a sequence of substreams; a new substream begins whenpred(item)returns true, with the splitting element going to the new substream.- unzip
unzip(src)— split a source of(A, B)pairs into two sources. The second is buffered if the first lags (no backpressure across the split — matches akka.net’s fan-out semantics).- watch_
termination watch_termination(src)returns the original source plus aoneshot::Receiver<()>that fires when upstream completes (whether by exhaustion or by the receiver being polled past the final element).- with_
decider - Apply
deciderto each error insrc, emitting only the survivingOkpayloads. - zip
- akka.net:
Zip— pair corresponding elements. - zip_
with - akka.net:
ZipWith— pair corresponding elements and applyf. - zip_
with_ index - akka.net:
ZipWithIndex.