Namespace Akka.Streams
Classes
AbruptStageTerminationException
Signal that the stage was abruptly terminated, usually seen as a call to PostStop() without any of the handler callbacks seeing completion or failure from upstream or cancellation from downstream. This can happen when the actor running the graph is killed, which happens when the materializer or actor system is terminated.
AbruptTerminationException
This exception signals that an actor implementing a Reactive Streams Subscriber, Publisher or Processor has been terminated without being notified by an onError, onComplete or cancel signal. This usually happens when an ActorSystem is shut down while stream processing actors are still running.
ActorAttributes
Attributes for the ActorMaterializer. Note that more attributes defined in Attributes.
ActorAttributes.DebugLogging
Enables additional low level troubleshooting logging at DEBUG log level
Use factory method CreateDebugLogging
to create.
ActorAttributes.Dispatcher
Configures the dispatcher to be used by streams.
Use factory method CreateDispatcher(String) to create instances.
ActorAttributes.FuzzingMode
Test utility: fuzzing mode means that GraphStage events are not processed in FIFO order within a fused subgraph, but randomized.
Use factory method CreateFuzzingMode
to create.
ActorAttributes.MaxFixedBufferSize
Configure the maximum buffer size for which a FixedSizeBuffer will be preallocated. This defaults to a large value because it is usually better to fail early when system memory is not sufficient to hold the buffer.
Use factory method CreateMaxFixedBufferSize
to create.
ActorAttributes.OutputBurstLimit
Maximum number of elements emitted in batch if downstream signals large demand.
Use factory method CreateOutputBurstLimit
to create.
ActorAttributes.StreamSubscriptionTimeout
Defines a timeout for stream subscription and what action to take when that hits.
Use factory method CreateStreamSubscriptionTimeout
to create.
ActorAttributes.SupervisionStrategy
TBD
ActorAttributes.SyncProcessingLimit
Limit for number of messages that can be processed synchronously in stream to substream communication.
Use factory method CreateSyncProcessingLimit
to create.
ActorMaterializer
A ActorMaterializer takes the list of transformations comprising a IFlow<TOut, TMat> and materializes them in the form of Reactive.Streams.IProcessor`2 instances. How transformation steps are split up into asynchronous regions is implementation dependent.
ActorMaterializerExtensions
TBD
ActorMaterializerSettings
This class describes the configurable properties of the ActorMaterializer. Please refer to the withX methods for descriptions of the individual settings.
AmorphousShape
This type of Shape can express any number of inputs and outputs at the expense of forgetting about their specific types. It is used mainly in the implementation of the IGraph<TShape, TMaterialized> builders and typically replaced by a more meaningful type of Shape when the building is finished.
Attributes
Holds attributes which can be used to alter Flow<TIn, TOut, TMat> or GraphDsl materialization.
Note that more attributes for the ActorMaterializer are defined in ActorAttributes.
Attributes.AsyncBoundary
TBD
Attributes.CancellationStrategy
Cancellation strategies provide a way to configure the behavior of a stage
when cancelStage
is called.
It is only relevant for stream components that have more than one output
and do not define a custom cancellation behavior by overriding onDownstreamFinish
.
In those cases, if the first output is cancelled, the default behavior
is to call cancelStage
which shuts down the stage completely.
The given strategy will allow customization of how the shutdown procedure should be done precisely.
Attributes.CancellationStrategy.AfterDelay
Strategy that allows to delay any action when cancelStage
is invoked.
The idea of this strategy is to delay any action on cancellation because it is expected that the stage is completed through another path in the meantime. The downside is that a stage and a stream may live longer than expected if no such signal is received and cancellation is invoked later on. In streams with many stages that all apply this strategy, this strategy might significantly delay the propagation of a cancellation signal because each upstream stage might impose such a delay. During this time, the stream will be mostly "silent", i.e. it cannot make progress because of backpressure, but you might still be able observe a long delay at the ultimate source.
Attributes.CancellationStrategy.CompleteStage
Strategy that treats cancelStage
the same as completeStage
, i.e. all inlets are cancelled (propagating the
cancellation cause) and all outlets are regularly completed.
This used to be the default behavior before Akka 2.6.
This behavior can be problematic in stacks of BidiFlows where different layers of the stack are both connected through inputs and outputs. In this case, an error in a doubly connected component triggers both a cancellation going upstream and an error going downstream.Since the stack might be connected to those components with inlets and outlets, a race starts whether the cancellation or the error arrives first.If the error arrives first, that's usually good because then the error can be propagated both on inlets and outlets.However, if the cancellation arrives first, the previous default behavior to complete the stage will lead other outputs to be completed regularly.The error which arrive late at the other hand will just be ignored (that connection will have been cancelled already and also the paths through which the error could propagates are already shut down).
Attributes.CancellationStrategy.FailStage
Strategy that treats cancelStage
the same as failStage
, i.e. all inlets are cancelled (propagating the
cancellation cause) and all outlets are failed propagating the cause from cancellation.
Attributes.CancellationStrategy.PropagateFailure
Strategy that treats cancelStage
in different ways depending on the cause that was given to the cancellation.
If the cause was a regular, active cancellation (SubscriptionWithCancelException.NoMoreElementsNeeded
), the stage
receiving this cancellation is completed regularly.
If another cause was given, this is treated as an error and the behavior is the same as with failStage
.
This is a good default strategy.
Attributes.InputBuffer
Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape. This attribute configures the initial and maximal input buffer in number of elements for each inlet.
Use factory method CreateInputBuffer(Int32, Int32) to create instances.
Attributes.LogLevels
TBD
Attributes.Name
Specifies the name of the operation.
Use factory method CreateName(String) to create instances.
BidiShape
TBD
BidiShape<TIn1, TOut1, TIn2, TOut2>
A bidirectional flow of elements that consequently has two inputs and two outputs.
BindFailedException
TBD
BufferOverflowException
TBD
ClosedShape
This Shape is used for graphs that have neither open inputs nor open outputs. Only such a IGraph<TShape, TMaterialized> can be materialized by a IMaterializer.
ConnectionException
TBD
Construct
TBD
FanInShape<TOut>
TBD
FanInShape<TOut>.InitName
TBD
FanInShape<TOut>.InitPorts
TBD
FanInShape<T0, T1, T2, T3, T4, T5, T6, T7, T8, TOut>
TBD
FanInShape<T0, T1, TOut>
TBD
FanInShape<T0, T1, T2, TOut>
TBD
FanInShape<T0, T1, T2, T3, TOut>
TBD
FanInShape<T0, T1, T2, T3, T4, TOut>
TBD
FanInShape<T0, T1, T2, T3, T4, T5, TOut>
TBD
FanInShape<T0, T1, T2, T3, T4, T5, T6, TOut>
TBD
FanInShape<T0, T1, T2, T3, T4, T5, T6, T7, TOut>
TBD
FanInShapeN<T0, T1, TOut>
TBD
FanOutShape<TIn>
TBD
FanOutShape<TIn>.InitName
TBD
FanOutShape<TIn>.InitPorts
TBD
FanOutShape<TIn, T0, T1, T2, T3, T4, T5, T6, T7, T8>
TBD
FanOutShape<TIn, T0, T1>
TBD
FanOutShape<TIn, T0, T1, T2>
TBD
FanOutShape<TIn, T0, T1, T2, T3>
TBD
FanOutShape<TIn, T0, T1, T2, T3, T4>
TBD
FanOutShape<TIn, T0, T1, T2, T3, T4, T5>
TBD
FanOutShape<TIn, T0, T1, T2, T3, T4, T5, T6>
TBD
FanOutShape<TIn, T0, T1, T2, T3, T4, T5, T6, T7>
TBD
FlowMonitor
TBD
FlowMonitor.Failed
Stream failed
FlowMonitor.Finished
Stream completed successfully
FlowMonitor.Initialized
Stream was created, but no events have passed through it
FlowMonitor.Received<T>
Stream processed a message
FlowShape<TIn, TOut>
A Flow Shape has exactly one input and one output, it looks from the outside like a pipe (but it can be a complex topology of streams within of course).
Fusing
This class holds some graph transformation functions that can fuse together multiple operation stages into synchronous execution islands. The purpose is to reduce the number of Actors that are created in order to execute the stream and thereby improve start-up cost as well as reduce element traversal latency for large graphs. Fusing itself is a time-consuming operation, meaning that usually it is best to cache the result of this computation and reuse it instead of fusing the same graph many times.
Fusing together all operations which allow this treatment will reduce the parallelism that is available in the stream graph’s execution—in the worst case it will become single-threaded and not benefit from multiple CPU cores at all. Where parallelism is required, the Attributes.AsyncBoundary attribute can be used to declare subgraph boundaries across which the graph shall not be fused.
Fusing.FusedGraph<TShape, TMat>
A fused graph of the right shape, containing a FusedModule which holds more information on the operation structure of the contained stream topology for convenient graph traversal.
GraphDelegate<TShape, TMat>
Allows creating additional API on top of an existing Graph by extending from this class and accessing the delegate
Inlet
An Inlet is a typed input to a Shape. Its partner in the Module view is the InPort(which does not bear an element type because Modules only express the internal structural hierarchy of stream topologies).
Inlet<T>
TBD
InPort
An input port of a IModule. This type logically belongs into the impl package but must live here due to how sealed works. It is also used in the Java DSL for "untyped Inlets" as a work-around for otherwise unreasonable existential types.
InvalidPartnerActorException
Stream refs establish a connection between a local and remote actor, representing the origin and remote sides of a stream. Each such actor refers to the other side as its "partner". We make sure that no other actor than the initial partner can send demand/messages to the other side accidentally.
This exception is thrown when a message is recived from a non-partner actor, which could mean a bug or some actively malicient behavior from the other side.
This is not meant as a security feature, but rather as plain sanity-check.
InvalidSequenceNumberException
KillSwitches
Creates shared or single kill switches which can be used to control completion of graphs from the outside.
- The factory Shared(String) returns a SharedKillSwitch which provides a IGraph<TShape> of FlowShape<TIn, TOut> that can be used in arbitrary number of graphs and materializations. The switch simultaneously controls completion in all of those graphs.
- The factory Single<T>() returns a IGraph<TShape> of FlowShape<TIn, TOut> that materializes to a UniqueKillSwitch which is always unique to that materialized Flow itself.
MaterializationException
This exception or subtypes thereof should be used to signal materialization failures.
NoMaterializer
TBD
NoSuchElementException
TBD
Outlet
An Outlet is a typed output to a Shape. Its partner in the Module view is the OutPort(which does not bear an element type because Modules only express the internal structural hierarchy of stream topologies).
Outlet<T>
TBD
OutPort
An output port of a StreamLayout.Module. This type logically belongs into the impl package but must live here due to how sealed works. It is also used in the Java DSL for "untyped Outlets" as a work-around for otherwise unreasonable existential types.
QueueOfferResult
TBD
QueueOfferResult.Dropped
TBD
QueueOfferResult.Enqueued
TBD
QueueOfferResult.Failure
TBD
QueueOfferResult.QueueClosed
TBD
RemoteStreamRefActorTerminatedException
RestartSettings
Shape
A Shape describes the inlets and outlets of a IGraph<TShape>. In keeping with the philosophy that a Graph is a freely reusable blueprint, everything that matters from the outside are the connections that can be made with it, otherwise it is just a black box.
SharedKillSwitch
A SharedKillSwitch is a provider for IGraph<TShape>s of FlowShape<TIn, TOut> that can be completed or failed from the outside.
A IGraph<TShape> returned by the switch can be materialized arbitrary amount of times: every newly materializedIGraph<TShape> belongs to the switch from which it was acquired. Multiple SharedKillSwitch instances are isolated from each other, shutting down or aborting on instance does not affect the IGraph<TShape>s provided by another instance.
After calling Shutdown() all materialized, running instances of all IGraph<TShape>s provided by the SharedKillSwitch will complete their downstreams and cancel their upstreams(unless if finished or failed already in which case the command is ignored). Subsequent invocations of Shutdown() and Abort(Exception) will be ignored.
After calling Abort(Exception) all materialized, running instances of all IGraph<TShape>s provided by the SharedKillSwitch will fail their downstreams with the provided exception and cancel their upstreams (unless it finished or failed already in which case the command is ignored). Subsequent invocations of Shutdown() and Abort(Exception) will be ignored.
The IGraph<TShape>s provided by the SharedKillSwitch do not modify the passed through elements in any way or affect backpressure in the stream. All provided IGraph<TShape>s provide the parent SharedKillSwitch as materialized value.
This class is thread-safe, the instance can be passed safely among threads and its methods may be invoked concurrently.
SinkShape<TIn>
A Sink Shape has exactly one input and no outputs, it models a data sink.
SourceShape<TOut>
A Source Shape has exactly one output and no inputs, it models a source of data.
StreamDetachedException
This exception signals that materialized value is already detached from stream. This usually happens when stream is completed and an ActorSystem is shut down while materialized object is still available.
StreamLimitReachedException
TBD
StreamRefAttributes
Attributes for stream refs (ISourceRef<TOut> and ISinkRef<TIn>). Note that more attributes defined in Attributes and ActorAttributes.
StreamRefAttributes.BufferCapacity
Specifies the size of the buffer on the receiving side that is eagerly filled even without demand.
StreamRefAttributes.DemandRedeliveryInterval
If no new elements arrive within this timeout, demand is redelivered.
StreamRefAttributes.FinalTerminationSignalDeadline
The time between the Terminated signal being received and when the local SourceRef determines to fail itself
StreamRefAttributes.SubscriptionTimeout
Specifies the subscription timeout within which the remote side MUST subscribe to the handed out stream reference.
StreamRefSubscriptionTimeoutException
StreamSubscriptionTimeoutSettings
Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured by StreamSubscriptionTimeoutSettings.
StreamTcpException
TBD
SubscriptionWithCancelException
SubscriptionWithCancelException.NoMoreElementsNeeded
SubscriptionWithCancelException.NonFailureCancellation
SubscriptionWithCancelException.StageWasCompleted
TargetRefNotInitializedYetException
TooManySubstreamsOpenException
This exception signals that the maximum number of substreams declared has been exceeded. A finite limit is imposed so that memory usage is controlled.
TransformerLikeBase<TIn, TOut>
TBD
UniformFanInShape<TIn, TOut>
TBD
UniformFanOutShape<TIn, TOut>
TBD
UniqueKillSwitch
A UniqueKillSwitch is always a result of a materialization (unlike SharedKillSwitch which is constructed before any materialization) and it always controls that graph and stage which yielded the materialized value.
After calling Shutdown() the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will complete its downstream and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
After calling Abort(Exception) the running instance of the IGraph<TShape> of FlowShape<TIn, TOut> that materialized to the UniqueKillSwitch will fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
It is also possible to individually cancel, complete or fail upstream and downstream parts by calling the corresponding methods.
WatchedActorTerminatedException
Used as failure exception by an ask
operator if the target actor terminates.
Structs
MaterializationContext
Context parameter to the create methods of sources and sinks.
Interfaces
Attributes.CancellationStrategy.IStrategy
Attributes.IAttribute
TBD
Attributes.IMandatoryAttribute
Attributes that are always present (is defined with default values by the materializer)
Not for user extension
FanInShape<TOut>.IInit
TBD
FanOutShape<TIn>.IInit
TBD
FlowMonitor.IStreamState
TBD
IFlowMonitor
Used to monitor the state of a stream
IFlowShape
TBD
IGraph<TShape>
IGraph<TShape, TMaterialized>
IKillSwitch
A IKillSwitch allows completion of IGraph<TShape>s from the outside by completing IGraph<TShape>s of FlowShape<TIn, TOut> linked to the switch. Depending on whether the IKillSwitch is a UniqueKillSwitch or a SharedKillSwitch one or multiple streams might be linked with the switch. For details see the documentation of the concrete subclasses of this interface.
IMaterializer
Materializer SPI (Service Provider Interface)
Custom materializer implementations should be aware that the materializer SPI is not yet final and may change in patch releases of Akka. Please note that this does not impact end-users of Akka streams, only implementors of custom materializers, with whom the Akka.Net team co-ordinates such changes.
Once the SPI is final this notice will be removed.
IMaterializerLoggingProvider
SPI intended only to be extended by custom IMaterializer implementations, that also want to provide stages they materialize with specialized ILoggingAdapter instances.
IQueueOfferResult
Used as return type for async callbacks to streams
ISinkQueue<T>
Trait allows to have the queue as a sink for some stream. "SinkQueue" pulls data from stream with backpressure mechanism.
ISinkRef<TIn>
A ISinkRef<TIn> allows sharing a "reference" to a Sink<TIn, TMat> with others, with the main purpose of crossing a network boundary. Usually obtaining a SinkRef would be done via Actor messaging, in which one system asks a remote one, to accept some data from it, and the remote one decides to accept the request to send data in a back-pressured streaming fashion -- using a sink ref.
To create a ISinkRef<TIn> you have to materialize the Sink that you want to obtain a reference to by attaching it to a SinkRef<T>().
Stream refs can be seen as Reactive Streams over network boundaries.
For additional configuration see reference.conf
as well as StreamRefAttributes.
ISourceQueue<T>
This interface allows to have the queue as a data source for some stream.
ISourceQueueWithComplete<T>
This interface adds completion support to ISourceQueue<T>
ISourceRef<TOut>
A SourceRef allows sharing a "reference" with others, with the main purpose of crossing a network boundary. Usually obtaining a SourceRef would be done via Actor messaging, in which one system asks a remote one, to share some data with it, and the remote one decides to do so in a back-pressured streaming fashion -- using a stream ref.
To create a ISourceRef<TOut> you have to materialize the Source that you want to obtain a reference to by attaching it to a SourceRef<T>().
Stream refs can be seen as Reactive Streams over network boundaries.
For additional configuration see reference.conf
as well as StreamRefAttributes.
ISubscriptionWithCancelException
ITransformerLike<TIn, TOut>
TBD
IUntypedPublisher
TBD
IUntypedSubscriber
TBD
StreamRefAttributes.IStreamRefAttribute
Attributes specific to stream refs.
Not for user extension.
Enums
DelayOverflowStrategy
Represents a strategy that decides how to deal with a buffer of time based stage that is full but is about to receive a new element.
OverflowStrategy
Represents a strategy that decides how to deal with a buffer that is full but is about to receive a new element.
StreamSubscriptionTimeoutTerminationMode
This mode describes what shall happen when the subscription timeout expires for substream Publishers created by operations like Akka.Streams.Dsl.Internal.InternalFlowOperations.PrefixAndTail``2(Akka.Streams.Dsl.IFlow{``0,``1},System.Int32).
SubstreamCancelStrategy
Represents a strategy that decides how to deal with substream events.
ThrottleMode
Represents a mode that decides how to deal exceed rate for Throttle combinator.