Signal that the stage was abruptly terminated, usually seen as a call to postStop
of the GraphStageLogic
without
any of the handler callbacks seeing completion or failure from upstream or cancellation from downstream.
Signal that the stage was abruptly terminated, usually seen as a call to postStop
of the GraphStageLogic
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.
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 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.
Java API for creating custom Shape types.
An ActorMaterializer takes the list of transformations comprising a akka.stream.scaladsl.Flow and materializes them in the form of org.reactivestreams.Processor instances.
An ActorMaterializer takes the list of transformations comprising a akka.stream.scaladsl.Flow and materializes them in the form of org.reactivestreams.Processor instances. How transformation steps are split up into asynchronous regions is implementation dependent.
This class describes the configurable properties of the ActorMaterializer.
This class describes the configurable properties of the ActorMaterializer.
Please refer to the withX
methods for descriptions of the individual settings.
This type of Shape can express any number of inputs and outputs at the expense of forgetting about their specific types.
Holds attributes which can be used to alter akka.stream.scaladsl.Flow / akka.stream.javadsl.Flow or akka.stream.scaladsl.GraphDSL / akka.stream.javadsl.GraphDSL materialization.
Holds attributes which can be used to alter akka.stream.scaladsl.Flow / akka.stream.javadsl.Flow or akka.stream.scaladsl.GraphDSL / akka.stream.javadsl.GraphDSL materialization.
Note that more attributes for the ActorMaterializer are defined in ActorAttributes.
The
is ordered with the most specific attribute first, least specific last.
Note that the order was the opposite in Akka 2.4.x.
attributeList
A bidirectional flow of elements that consequently has two inputs and two outputs, arranged like this:
A bidirectional flow of elements that consequently has two inputs and two outputs, arranged like this:
+------+ In1 ~>| |~> Out1 | bidi | Out2 <~| |<~ In2 +------+
The client is usually the side that consumes the service provided by its interlocutor.
The client is usually the side that consumes the service provided by its interlocutor. The precise interpretation of this role is protocol specific.
This Shape is used for graphs that have neither open inputs nor open outputs.
This Shape is used for graphs that have neither open inputs nor open outputs. Only such a Graph can be materialized by a Materializer.
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.
see TLSClosing
Used to monitor the state of a stream
Used to monitor the state of a stream
Type of messages passed by the stream
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).
Holds a result of an IO operation.
Holds a result of an IO operation.
Numeric value depending on context, for example IO operations performed or bytes processed.
Status of the result. Can be either akka.Done or an exception.
see TLSClosing
see TLSClosing
see TLSClosing
An input port of a StreamLayout.Module.
An input 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 Inlets” as a work-around
for otherwise unreasonable existential types.
A KillSwitch allows completion of Graphs from the outside by completing Graphs of FlowShape linked to the switch.
A KillSwitch allows completion of Graphs from the outside by completing Graphs of FlowShape linked to the switch. Depending on whether the KillSwitch 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.
Context parameter to the create
methods of sources and sinks.
This exception or subtypes thereof should be used to signal materialization failures.
Materializer SPI (Service Provider Interface)
Materializer SPI (Service Provider Interface)
Binary compatibility is NOT guaranteed on materializer internals.
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 team co-ordinates such changes.
Once the SPI is final this notice will be removed.
SPI intended only to be extended by custom Materializer implementations, that also want to provide stages they materialize with specialized akka.event.LoggingAdapter instances.
An output port of a StreamLayout.Module.
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.
Represents a strategy that decides how to deal with a buffer that is full but is about to receive a new element.
Exception that is thrown when rated controlled by stream is exceeded
The server is usually the side the provides the service to its interlocutor.
The server is usually the side the provides the service to its interlocutor. The precise interpretation of this role is protocol specific.
A Shape describes the inlets and outlets of a Graph.
A Shape describes the inlets and outlets of a Graph. 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.
A SharedKillSwitch is a provider for Graphs of FlowShape that can be completed or failed from the outside.
A SharedKillSwitch is a provider for Graphs of FlowShape that can be completed or failed from the outside. A Graph returned by the switch can be materialized arbitrary amount of times: every newly materialized Graph 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 Graphs provided by another instance.
After calling SharedKillSwitch#shutdown() all materialized, running instances of all Graphs 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 SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.
After calling SharedKillSwitch#abort() all materialized, running instances of all Graphs 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 SharedKillSwitch#shutdown() and SharedKillSwitch#abort() will be ignored.
The Graphs provided by the SharedKillSwitch do not modify the passed through elements in any way or affect backpressure in the stream. All provided Graphs 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.
A Sink Shape has exactly one input and no outputs, it models a data sink.
A Source Shape has exactly one output and no inputs, it models a source of data.
This exception signals that materialized value is already detached from stream.
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.
Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured by StreamSubscriptionTimeoutSettings.
This mode describes what shall happen when the subscription timeout expires for
substream Publishers created by operations like prefixAndTail
.
Represents a strategy that decides how to deal with substream events.
An SSLEngine can either demand, allow or ignore its peer’s authentication
(via certificates), where Need
will fail the handshake if the peer does
not provide valid credentials, Want
allows the peer to send credentials
and verifies them if provided, and None
disables peer certificate
verification.
An SSLEngine can either demand, allow or ignore its peer’s authentication
(via certificates), where Need
will fail the handshake if the peer does
not provide valid credentials, Want
allows the peer to send credentials
and verifies them if provided, and None
disables peer certificate
verification.
See the documentation for SSLEngine::setWantClientAuth
for more information.
All streams in Akka are unidirectional: while in a complex flow graph data may flow in multiple directions these individual flows are independent from each other.
All streams in Akka are unidirectional: while in a complex flow graph data may flow in multiple directions these individual flows are independent from each other. The difference between two half-duplex connections in opposite directions and a full-duplex connection is that the underlying transport is shared in the latter and tearing it down will end the data transfer in both directions.
When integrating a full-duplex transport medium that does not support half-closing (which means ending one direction of data transfer without ending the other) into a stream topology, there can be unexpected effects. Feeding a finite Source into this medium will close the connection after all elements have been sent, which means that possible replies may not be received in full. To support this type of usage, the sending and receiving of data on the same side (e.g. on the Client) need to be coordinated such that it is known when all replies have been received. Only then should the transport be shut down.
To support these scenarios it is recommended that the full-duplex transport integration is configurable in terms of termination handling, which means that the user can optionally suppress the normal (closing) reaction to completion or cancellation events, as is expressed by the possible values of this type:
Represents a mode that decides how to deal exceed rate for Throttle combinator
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.
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 UniqueKillSwitch#shutdown() the running instance of the Graph of FlowShape 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 UniqueKillSwitch#abort() the running instance of the Graph of FlowShape 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.
(Since version 2.5.5) FanInShape1N was removed because it was not used anywhere. Use a custom shape extending from FanInShape directly.
Attributes for the ActorMaterializer.
Attributes for the ActorMaterializer. Note that more attributes defined in Attributes.
Note that more attributes for the ActorMaterializer are defined in ActorAttributes.
An Inlet is a typed input to a Shape.
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).
Creates shared or single kill switches which can be used to control completion of graphs from the outside.
Creates shared or single kill switches which can be used to control completion of graphs from the outside.
shared()
returns a SharedKillSwitch which provides a Graph of FlowShape that can be
used in arbitrary number of graphs and materializations. The switch simultaneously
controls completion in all of those graphs.single()
returns a Graph of FlowShape that materializes to a UniqueKillSwitch
which is always unique
to that materialized Flow itself.Creates a SharedKillSwitch that can be used to externally control the completion of various streams.
An Outlet is a typed output to a Shape.
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).
Contains types that is used as return types for async callbacks to streams
Many protocols are asymmetric and distinguish between the client and the server, where the latter listens passively for messages and the former actively initiates the exchange.
Scala API: The flow DSL allows the formulation of stream transformations based on some input.
Scala API: The flow DSL allows the formulation of stream transformations based on some input. The starting point is called Source and can be a collection, an iterator, a block of code which is evaluated repeatedly or a org.reactivestreams.Publisher. A flow with an attached input and open output is also a Source.
A flow may also be defined without an attached input or output and that is then
a Flow. The Flow
can be connected to the Source
later by using Source#via with
the flow as argument, and it remains a Source.
Transformations can be appended to Source
and Flow
with the operations
defined in FlowOps. Each DSL element produces a new flow that can be further transformed,
building up a description of the complete transformation pipeline.
The termination point of a flow is called Sink and can for example be a Future
or
org.reactivestreams.Subscriber. A flow with an attached output and open input
is also a Sink.
If a flow has both an attached input and an attached output it becomes a RunnableGraph. In order to execute this pipeline the flow must be materialized by calling RunnableGraph#run on it.
You can create your Source
, Flow
and Sink
in any order and then wire them together before
they are materialized by connecting them using Flow#via and Flow#to, or connecting them into a
GraphDSL with fan-in and fan-out elements.
See Reactive Streams for details on org.reactivestreams.Publisher and org.reactivestreams.Subscriber.
It should be noted that the streams modeled by this library are “hot”, meaning that they asynchronously flow through a series of processors without detailed control by the user. In particular it is not predictable how many elements a given transformation step might buffer before handing elements downstream, which means that transformation functions may be invoked more often than for corresponding transformations on strict collections like List. *An important consequence* is that elements that were produced into a stream may be discarded by later processors, e.g. when using the #take combinator.
By default every operation is executed within its own akka.actor.Actor to enable full pipelining of the chained set of computations. This behavior is determined by the akka.stream.Materializer which is required by those methods that materialize the Flow into a series of org.reactivestreams.Processor instances. The returned reactive stream is fully started and active.
BindFailedException object will never be thrown. Match on the class instead.