p

akka.stream

scaladsl

package scaladsl

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 operator.

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.

Source
package.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scaladsl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class Balance[T] extends [UniformFanOutShape[T, T]]

    Fan-out the stream to several streams.

    Fan-out the stream to several streams. Each upstream element is emitted to the first available downstream consumer. It will not shut down until the subscriptions for at least two downstream subscribers have been established.

    A Balance has one in port and 2 or more out ports.

    Emits when any of the outputs stops backpressuring; emits the element to the first available output

    Backpressures when all of the outputs backpressure

    Completes when upstream completes

    Cancels when If eagerCancel is enabled: when any downstream cancels; otherwise: when all downstreams cancel

  2. final class BidiFlow[-I1, +O1, -I2, +O2, +Mat] extends [BidiShape[I1, O1, I2, O2], Mat]
  3. final class Broadcast[T] extends [UniformFanOutShape[T, T]]

    Fan-out the stream to several streams emitting each incoming upstream element to all downstream consumers.

    Fan-out the stream to several streams emitting each incoming upstream element to all downstream consumers. It will not shut down until the subscriptions for at least two downstream subscribers have been established.

    Emits when all of the outputs stops backpressuring and there is an input element available

    Backpressures when any of the outputs backpressure

    Completes when upstream completes

    Cancels when If eagerCancel is enabled: when any downstream cancels; otherwise: when all downstreams cancel

  4. final class Concat[T] extends [UniformFanInShape[T, T]]

    Takes multiple streams and outputs one stream formed from the input streams by first emitting all of the elements from the first stream and then emitting all of the elements from the second stream, etc.

    Takes multiple streams and outputs one stream formed from the input streams by first emitting all of the elements from the first stream and then emitting all of the elements from the second stream, etc.

    A Concat has one first port, one second port and one out port.

    Emits when the current stream has an element available; if the current input completes, it tries the next one

    Backpressures when downstream backpressures

    Completes when all upstreams complete

    Cancels when downstream cancels

  5. trait DelayStrategy[-T] extends AnyRef

    Allows to manage delay.

    Allows to manage delay. Can be stateful to compute delay for any sequence of elements, as instances are not shared among running streams and all elements go through nextDelay(), updating state and returning delay for that element.

  6. final class Flow[-In, +Out, +Mat] extends FlowOpsMat[Out, Mat] with [FlowShape[In, Out], Mat]

    A Flow is a set of stream processing steps that has one open input and one open output.

  7. trait FlowOps[+Out, +Mat] extends AnyRef

    Scala API: Operations offered by Sources and Flows with a free output side: the DSL flows left-to-right only.

    Scala API: Operations offered by Sources and Flows with a free output side: the DSL flows left-to-right only.

    INTERNAL API: this trait will be changed in binary-incompatible ways for classes that are derived from it! Do not implement this interface outside the Akka code base!

    Binary compatibility is only maintained for callers of this trait’s interface.

    Annotations
    @DoNotInherit()
  8. trait FlowOpsMat[+Out, +Mat] extends FlowOps[Out, Mat]

    INTERNAL API: this trait will be changed in binary-incompatible ways for classes that are derived from it! Do not implement this interface outside the Akka code base!

    INTERNAL API: this trait will be changed in binary-incompatible ways for classes that are derived from it! Do not implement this interface outside the Akka code base!

    Binary compatibility is only maintained for callers of this trait’s interface.

  9. final class FlowWithContext[-In, -CtxIn, +Out, +CtxOut, +Mat] extends GraphDelegate[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat] with FlowWithContextOps[Out, CtxOut, Mat]

    A flow that provides operations which automatically propagate the context of an element.

    A flow that provides operations which automatically propagate the context of an element. Only a subset of common operations from is supported. As an escape hatch you can use FlowWithContextOps.via to manually provide the context propagation for otherwise unsupported operations.

    An "empty" flow can be created by calling FlowWithContext[Ctx, T].

  10. trait FlowWithContextOps[+Out, +Ctx, +Mat] extends AnyRef

    Shared stream operations for and SourceWithContext that automatically propagate a context element with each data element.

  11. trait GraphApply extends AnyRef
  12. final class Interleave[T] extends [UniformFanInShape[T, T]]

    Interleave represents deterministic merge which takes N elements per input stream, in-order of inputs, emits them downstream and then cycles/"wraps-around" the inputs.

    Interleave represents deterministic merge which takes N elements per input stream, in-order of inputs, emits them downstream and then cycles/"wraps-around" the inputs.

    Emits when element is available from current input (depending on phase)

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerClose=false) or one upstream completes (eagerClose=true)

    Cancels when downstream cancels

  13. final class Merge[T] extends [UniformFanInShape[T, T]]

    Merge several streams, taking elements as they arrive from input streams (picking randomly when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking randomly when several have elements ready).

    Emits when one of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true), default value is false

    Cancels when downstream cancels

  14. final class MergeLatest[T, M] extends [UniformFanInShape[T, M]]
  15. final class MergePreferred[T] extends [MergePreferredShape[T]]

    Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking from preferred when several have elements ready).

    A MergePreferred has one out port, one preferred input port and 1 or more secondary in ports.

    Emits when one of the inputs has an element available, preferring a specified input if multiple have elements available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true), default value is false

    Cancels when downstream cancels

  16. final class MergePrioritized[T] extends [UniformFanInShape[T, T]]

    Merge several streams, taking elements as they arrive from input streams (picking from prioritized once when several have elements ready).

    Merge several streams, taking elements as they arrive from input streams (picking from prioritized once when several have elements ready).

    A MergePrioritized has one out port, one or more input port with their priorities.

    Emits when one of the inputs has an element available, preferring a input based on its priority if multiple have elements available

    Backpressures when downstream backpressures

    Completes when all upstreams complete (eagerComplete=false) or one upstream completes (eagerComplete=true), default value is false

    Cancels when downstream cancels

  17. final class MergeSequence[T] extends [UniformFanInShape[T, T]]

    Takes multiple streams whose elements in aggregate have a defined linear sequence with difference 1, starting at 0, and outputs a single stream containing these elements, in order.

    Takes multiple streams whose elements in aggregate have a defined linear sequence with difference 1, starting at 0, and outputs a single stream containing these elements, in order. That is, given a set of input streams with combined elements *ek*:

    *e0*, *e1*, *e2*, ..., *en*

    This will output a stream ordered by *k*.

    The elements in the input streams must already be sorted according to the sequence. The input streams do not need to be linear, but the aggregate stream must be linear, no element *k* may be skipped or duplicated, either of these conditions will cause the stream to fail.

    The typical use case for this is to merge a partitioned stream back together while maintaining order. This can be achieved by first using zipWithIndex on the input stream, then partitioning using a Partition fanout, and then maintaining the index through the processing of each partition before bringing together with this stage.

    Emits when one of the upstreams has the next expected element in the sequence available.

    Backpressures when downstream backpressures

    Completes when all upstreams complete

    Cancels when downstream cancels

  18. final class MergeSorted[T] extends [FanInShape2[T, T, T]]

    Merge two pre-sorted streams such that the resulting stream is sorted.

    Merge two pre-sorted streams such that the resulting stream is sorted.

    Emits when both inputs have an element available

    Backpressures when downstream backpressures

    Completes when all upstreams complete

    Cancels when downstream cancels

  19. final class Partition[T] extends [UniformFanOutShape[T, T]]

    Fan-out the stream to several streams.

    Fan-out the stream to several streams. emitting an incoming upstream element to one downstream consumer according to the partitioner function applied to the element

    Adheres to the ActorAttributes.SupervisionStrategy attribute.

    Emits when emits when an element is available from the input and the chosen output has demand

    Backpressures when the currently chosen output back-pressures

    Completes when upstream completes and no output is pending

    Cancels when all downstreams have cancelled (eagerCancel=false) or one downstream cancels (eagerCancel=true)

  20. final case class RunnableGraph[+Mat](traversalBuilder: TraversalBuilder) extends [ClosedShape, Mat] with Product with Serializable

    Flow with attached input and output, can be executed.

  21. trait ScalaSessionAPI extends AnyRef

    Allows access to an SSLSession with Scala types

  22. final class Sink[-In, +Mat] extends [SinkShape[In], Mat]

    A Sink is a set of stream processing steps that has one open input.

    A Sink is a set of stream processing steps that has one open input. Can be used as a Subscriber

  23. trait SinkQueue[T] extends AnyRef

    This trait allows to have a queue as a sink for a stream.

    This trait allows to have a queue as a sink for a stream. A SinkQueue pulls data from a stream with a backpressure mechanism.

  24. trait SinkQueueWithCancel[T] extends SinkQueue[T]

    This trait adds cancel support to SinkQueue.

  25. implicit final class SinkToCompletionStage[In, T] extends AnyVal
  26. final class Source[+Out, +Mat] extends FlowOpsMat[Out, Mat] with [SourceShape[Out], Mat]

    A Source is a set of stream processing steps that has one open output.

    A Source is a set of stream processing steps that has one open output. It can comprise any number of internal sources and transformations that are wired together, or it can be an “atomic” source, e.g. from a collection or a file. Materialization turns a Source into a Reactive Streams Publisher (at least conceptually).

  27. trait SourceQueue[T] extends AnyRef

    This trait allows to have a queue as a data source for some stream.

  28. trait SourceQueueWithComplete[T] extends SourceQueue[T]

    This trait adds completion support to SourceQueue.

  29. implicit final class SourceToCompletionStage[Out, T] extends AnyVal
  30. final class SourceWithContext[+Out, +Ctx, +Mat] extends GraphDelegate[SourceShape[(Out, Ctx)], Mat] with FlowWithContextOps[Out, Ctx, Mat]

    A source that provides operations which automatically propagate the context of an element.

    A source that provides operations which automatically propagate the context of an element. Only a subset of common operations from is supported. As an escape hatch you can use FlowWithContextOps.via to manually provide the context propagation for otherwise unsupported operations.

    Can be created by calling Source.asSourceWithContext

  31. trait SubFlow[+Out, +Mat, +F[+_], C] extends FlowOps[Out, Mat]

    A “stream of streams” sub-flow of data elements, e.g.

    A “stream of streams” sub-flow of data elements, e.g. produced by groupBy. SubFlows cannot contribute to the super-flow’s materialized value since they are materialized later, during the runtime of the flow graph processing.

    Not for user extension

    Annotations
    @DoNotInherit()
  32. final class Tcp extends Extension
  33. final class TcpIdleTimeoutException extends with NoStackTrace
  34. final class Unzip[A, B] extends UnzipWith2[(A, B), A, B]

    Takes a stream of pair elements and splits each pair to two output streams.

    Takes a stream of pair elements and splits each pair to two output streams.

    An Unzip has one in port and one left and one right output port.

    Emits when all of the outputs stop backpressuring and there is an input element available

    Backpressures when any of the outputs backpressure

    Completes when upstream completes

    Cancels when any downstream cancels

  35. class UnzipWith10[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10] extends [FanOutShape10[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10]]

    UnzipWith specialized for 10 outputs

  36. class UnzipWith11[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11] extends [FanOutShape11[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11]]

    UnzipWith specialized for 11 outputs

  37. class UnzipWith12[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12] extends [FanOutShape12[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12]]

    UnzipWith specialized for 12 outputs

  38. class UnzipWith13[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13] extends [FanOutShape13[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13]]

    UnzipWith specialized for 13 outputs

  39. class UnzipWith14[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14] extends [FanOutShape14[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14]]

    UnzipWith specialized for 14 outputs

  40. class UnzipWith15[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15] extends [FanOutShape15[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15]]

    UnzipWith specialized for 15 outputs

  41. class UnzipWith16[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16] extends [FanOutShape16[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16]]

    UnzipWith specialized for 16 outputs

  42. class UnzipWith17[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17] extends [FanOutShape17[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17]]

    UnzipWith specialized for 17 outputs

  43. class UnzipWith18[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18] extends [FanOutShape18[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18]]

    UnzipWith specialized for 18 outputs

  44. class UnzipWith19[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19] extends [FanOutShape19[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19]]

    UnzipWith specialized for 19 outputs

  45. class UnzipWith2[In, A1, A2] extends [FanOutShape2[In, A1, A2]]

    UnzipWith specialized for 2 outputs

  46. class UnzipWith20[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20] extends [FanOutShape20[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20]]

    UnzipWith specialized for 20 outputs

  47. class UnzipWith21[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21] extends [FanOutShape21[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21]]

    UnzipWith specialized for 21 outputs

  48. class UnzipWith22[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22] extends [FanOutShape22[In, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22]]

    UnzipWith specialized for 22 outputs

  49. class UnzipWith3[In, A1, A2, A3] extends [FanOutShape3[In, A1, A2, A3]]

    UnzipWith specialized for 3 outputs

  50. class UnzipWith4[In, A1, A2, A3, A4] extends [FanOutShape4[In, A1, A2, A3, A4]]

    UnzipWith specialized for 4 outputs

  51. class UnzipWith5[In, A1, A2, A3, A4, A5] extends [FanOutShape5[In, A1, A2, A3, A4, A5]]

    UnzipWith specialized for 5 outputs

  52. class UnzipWith6[In, A1, A2, A3, A4, A5, A6] extends [FanOutShape6[In, A1, A2, A3, A4, A5, A6]]

    UnzipWith specialized for 6 outputs

  53. class UnzipWith7[In, A1, A2, A3, A4, A5, A6, A7] extends [FanOutShape7[In, A1, A2, A3, A4, A5, A6, A7]]

    UnzipWith specialized for 7 outputs

  54. class UnzipWith8[In, A1, A2, A3, A4, A5, A6, A7, A8] extends [FanOutShape8[In, A1, A2, A3, A4, A5, A6, A7, A8]]

    UnzipWith specialized for 8 outputs

  55. class UnzipWith9[In, A1, A2, A3, A4, A5, A6, A7, A8, A9] extends [FanOutShape9[In, A1, A2, A3, A4, A5, A6, A7, A8, A9]]

    UnzipWith specialized for 9 outputs

  56. trait UnzipWithApply extends AnyRef
  57. final class Zip[A, B] extends ZipWith2[A, B, (A, B)]

    Combine the elements of 2 streams into a stream of tuples.

    Combine the elements of 2 streams into a stream of tuples.

    A Zip has a left and a right input port and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  58. final class ZipLatest[A, B] extends ZipLatestWith2[A, B, (A, B)]

    Combine the elements of 2 streams into a stream of tuples, picking always the latest element of each.

    Combine the elements of 2 streams into a stream of tuples, picking always the latest element of each.

    A ZipLatest has a left and a right input port and one out port.

    No element is emitted until at least one element from each Source becomes available.

    Emits when all of the inputs have at least an element available, and then each time an element becomes * available on either of the inputs

    Backpressures when downstream backpressures

    Completes when any upstream completes if eagerComplete is enabled or wait for all upstreams to complete

    Cancels when downstream cancels

  59. class ZipLatestWith10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, O] extends [FanInShape10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, O]]

    ZipLatestWith specialized for 10 inputs

  60. class ZipLatestWith11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, O] extends [FanInShape11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, O]]

    ZipLatestWith specialized for 11 inputs

  61. class ZipLatestWith12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, O] extends [FanInShape12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, O]]

    ZipLatestWith specialized for 12 inputs

  62. class ZipLatestWith13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, O] extends [FanInShape13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, O]]

    ZipLatestWith specialized for 13 inputs

  63. class ZipLatestWith14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, O] extends [FanInShape14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, O]]

    ZipLatestWith specialized for 14 inputs

  64. class ZipLatestWith15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, O] extends [FanInShape15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, O]]

    ZipLatestWith specialized for 15 inputs

  65. class ZipLatestWith16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, O] extends [FanInShape16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, O]]

    ZipLatestWith specialized for 16 inputs

  66. class ZipLatestWith17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, O] extends [FanInShape17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, O]]

    ZipLatestWith specialized for 17 inputs

  67. class ZipLatestWith18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, O] extends [FanInShape18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, O]]

    ZipLatestWith specialized for 18 inputs

  68. class ZipLatestWith19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, O] extends [FanInShape19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, O]]

    ZipLatestWith specialized for 19 inputs

  69. class ZipLatestWith2[A1, A2, O] extends [FanInShape2[A1, A2, O]]

    ZipLatestWith specialized for 2 inputs

  70. class ZipLatestWith20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, O] extends [FanInShape20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, O]]

    ZipLatestWith specialized for 20 inputs

  71. class ZipLatestWith21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, O] extends [FanInShape21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, O]]

    ZipLatestWith specialized for 21 inputs

  72. class ZipLatestWith22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, O] extends [FanInShape22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, O]]

    ZipLatestWith specialized for 22 inputs

  73. class ZipLatestWith3[A1, A2, A3, O] extends [FanInShape3[A1, A2, A3, O]]

    ZipLatestWith specialized for 3 inputs

  74. class ZipLatestWith4[A1, A2, A3, A4, O] extends [FanInShape4[A1, A2, A3, A4, O]]

    ZipLatestWith specialized for 4 inputs

  75. class ZipLatestWith5[A1, A2, A3, A4, A5, O] extends [FanInShape5[A1, A2, A3, A4, A5, O]]

    ZipLatestWith specialized for 5 inputs

  76. class ZipLatestWith6[A1, A2, A3, A4, A5, A6, O] extends [FanInShape6[A1, A2, A3, A4, A5, A6, O]]

    ZipLatestWith specialized for 6 inputs

  77. class ZipLatestWith7[A1, A2, A3, A4, A5, A6, A7, O] extends [FanInShape7[A1, A2, A3, A4, A5, A6, A7, O]]

    ZipLatestWith specialized for 7 inputs

  78. class ZipLatestWith8[A1, A2, A3, A4, A5, A6, A7, A8, O] extends [FanInShape8[A1, A2, A3, A4, A5, A6, A7, A8, O]]

    ZipLatestWith specialized for 8 inputs

  79. class ZipLatestWith9[A1, A2, A3, A4, A5, A6, A7, A8, A9, O] extends [FanInShape9[A1, A2, A3, A4, A5, A6, A7, A8, A9, O]]

    ZipLatestWith specialized for 9 inputs

  80. trait ZipLatestWithApply extends AnyRef
  81. final class ZipN[A] extends ZipWithN[A, Seq[A]]

    Combine the elements of multiple streams into a stream of sequences.

    Combine the elements of multiple streams into a stream of sequences.

    A ZipN has a n input ports and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  82. class ZipWith10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, O] extends [FanInShape10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, O]]

    ZipWith specialized for 10 inputs

  83. class ZipWith11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, O] extends [FanInShape11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, O]]

    ZipWith specialized for 11 inputs

  84. class ZipWith12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, O] extends [FanInShape12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, O]]

    ZipWith specialized for 12 inputs

  85. class ZipWith13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, O] extends [FanInShape13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, O]]

    ZipWith specialized for 13 inputs

  86. class ZipWith14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, O] extends [FanInShape14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, O]]

    ZipWith specialized for 14 inputs

  87. class ZipWith15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, O] extends [FanInShape15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, O]]

    ZipWith specialized for 15 inputs

  88. class ZipWith16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, O] extends [FanInShape16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, O]]

    ZipWith specialized for 16 inputs

  89. class ZipWith17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, O] extends [FanInShape17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, O]]

    ZipWith specialized for 17 inputs

  90. class ZipWith18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, O] extends [FanInShape18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, O]]

    ZipWith specialized for 18 inputs

  91. class ZipWith19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, O] extends [FanInShape19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, O]]

    ZipWith specialized for 19 inputs

  92. class ZipWith2[A1, A2, O] extends [FanInShape2[A1, A2, O]]

    ZipWith specialized for 2 inputs

  93. class ZipWith20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, O] extends [FanInShape20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, O]]

    ZipWith specialized for 20 inputs

  94. class ZipWith21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, O] extends [FanInShape21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, O]]

    ZipWith specialized for 21 inputs

  95. class ZipWith22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, O] extends [FanInShape22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, O]]

    ZipWith specialized for 22 inputs

  96. class ZipWith3[A1, A2, A3, O] extends [FanInShape3[A1, A2, A3, O]]

    ZipWith specialized for 3 inputs

  97. class ZipWith4[A1, A2, A3, A4, O] extends [FanInShape4[A1, A2, A3, A4, O]]

    ZipWith specialized for 4 inputs

  98. class ZipWith5[A1, A2, A3, A4, A5, O] extends [FanInShape5[A1, A2, A3, A4, A5, O]]

    ZipWith specialized for 5 inputs

  99. class ZipWith6[A1, A2, A3, A4, A5, A6, O] extends [FanInShape6[A1, A2, A3, A4, A5, A6, O]]

    ZipWith specialized for 6 inputs

  100. class ZipWith7[A1, A2, A3, A4, A5, A6, A7, O] extends [FanInShape7[A1, A2, A3, A4, A5, A6, A7, O]]

    ZipWith specialized for 7 inputs

  101. class ZipWith8[A1, A2, A3, A4, A5, A6, A7, A8, O] extends [FanInShape8[A1, A2, A3, A4, A5, A6, A7, A8, O]]

    ZipWith specialized for 8 inputs

  102. class ZipWith9[A1, A2, A3, A4, A5, A6, A7, A8, A9, O] extends [FanInShape9[A1, A2, A3, A4, A5, A6, A7, A8, A9, O]]

    ZipWith specialized for 9 inputs

  103. trait ZipWithApply extends AnyRef
  104. class ZipWithN[A, O] extends [UniformFanInShape[A, O]]

    Combine the elements of multiple streams into a stream of sequences using a combiner function.

    Combine the elements of multiple streams into a stream of sequences using a combiner function.

    A ZipWithN has a n input ports and one out port

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

Value Members

  1. object Balance
  2. object BidiFlow
  3. object Broadcast
  4. object BroadcastHub

    A BroadcastHub is a special streaming hub that is able to broadcast streamed elements to a dynamic set of consumers.

    A BroadcastHub is a special streaming hub that is able to broadcast streamed elements to a dynamic set of consumers. It consists of two parts, a and a . The broadcasts elements from a producer to the actually live consumers it has. Once the producer has been materialized, the it feeds into returns a materialized value which is the corresponding . This can be materialized an arbitrary number of times, where each of the new materializations will receive their elements from the original Sink.

  5. object Compression
  6. object Concat
  7. object DelayStrategy
  8. object FileIO

    Factories to create sinks and sources from files

  9. object Flow
  10. object FlowWithContext
  11. object Framing
  12. object GraphDSL extends GraphApply
  13. object Interleave
  14. object JavaFlowSupport

    For use only with JDK 9+.

    For use only with JDK 9+.

    Provides support for java.util.concurrent.Flow.* interfaces which mirror the Reactive Streams interfaces from org.reactivestreams. See: [http://www.reactive-streams.org/](reactive-streams.org).

  15. object JsonFraming

    Provides JSON framing operators that can separate valid JSON objects from incoming ByteString objects.

  16. object Keep

    Convenience functions for often-encountered purposes like keeping only the left (first) or only the right (second) of two input values.

  17. object Merge
  18. object MergeHub

    A MergeHub is a special streaming hub that is able to collect streamed elements from a dynamic set of producers.

    A MergeHub is a special streaming hub that is able to collect streamed elements from a dynamic set of producers. It consists of two parts, a and a . The streams the element to a consumer from its merged inputs. Once the consumer has been materialized, the returns a materialized value which is the corresponding . This can then be materialized arbitrary many times, where each of the new materializations will feed its consumed elements to the original Source.

  19. object MergeLatest

    MergeLatest joins elements from N input streams into stream of lists of size N.

    MergeLatest joins elements from N input streams into stream of lists of size N. i-th element in list is the latest emitted element from i-th input stream. MergeLatest emits list for each element emitted from some input stream, but only after each stream emitted at least one element

    Emits when element is available from some input and each input emits at least one element from stream start

    Completes when all upstreams complete (eagerClose=false) or one upstream completes (eagerClose=true)

    Cancels when downstream cancels

  20. object MergePreferred
  21. object MergePrioritized
  22. object MergeSequence
  23. object OrElse
  24. object Partition
  25. object PartitionHub

    A PartitionHub is a special streaming hub that is able to route streamed elements to a dynamic set of consumers.

    A PartitionHub is a special streaming hub that is able to route streamed elements to a dynamic set of consumers. It consists of two parts, a and a . The e elements from a producer to the actually live consumers it has. The selection of consumer is done with a function. Each element can be routed to only one consumer. Once the producer has been materialized, the it feeds into returns a materialized value which is the corresponding . This can be materialized an arbitrary number of times, where each of the new materializations will receive their elements from the original Sink.

  26. object RestartFlow

    A RestartFlow wraps a Flow that gets restarted when it completes or fails.

    A RestartFlow wraps a Flow that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the can necessarily guarantee it will, for example, for streams that depend on a remote server that may crash or become partitioned. The RestartFlow ensures that the graph can continue running while the Flow restarts.

  27. object RestartSink

    A RestartSink wraps a Sink that gets restarted when it completes or fails.

    A RestartSink wraps a Sink that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the can necessarily guarantee it will, for example, for streams that depend on a remote server that may crash or become partitioned. The RestartSink ensures that the graph can continue running while the Sink restarts.

  28. object RestartSource

    A RestartSource wraps a Source that gets restarted when it completes or fails.

    A RestartSource wraps a Source that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the can necessarily guarantee it will, for example, for streams that depend on a remote server that may crash or become partitioned. The RestartSource ensures that the graph can continue running while the Source restarts.

  29. object RestartSourceWithContext

    A RestartSourceWithContext wraps a SourceWithContext that gets restarted when it completes or fails.

    A RestartSourceWithContext wraps a SourceWithContext that gets restarted when it completes or fails.

    They are useful for graphs that need to run for longer than the can necessarily guarantee it will, e.g. for streams that depend on a remote service to which connectivity may be lost (crash or partition). The RestartSourceWithContext ensures that the graph can continue running while the SourceWithContext restarts.

  30. object RestartWithBackoffFlow
  31. object RetryFlow
  32. object RunnableGraph extends Serializable
  33. object ScalaSessionAPI
  34. object Sink
  35. object SinkQueueWithCancel
  36. object Source
  37. object SourceQueueWithComplete
  38. object SourceWithContext
  39. object StreamConverters

    Converters for interacting with the blocking java.io streams APIs and Java 8 Streams

  40. object StreamRefs

    Factories for creating stream refs.

  41. object TLS

    Stream cipher support based upon JSSE.

    Stream cipher support based upon JSSE.

    The underlying SSLEngine has four ports: plaintext input/output and ciphertext input/output. These are modeled as a akka.stream.BidiShape element for use in stream topologies, where the plaintext ports are on the left hand side of the shape and the ciphertext ports on the right hand side.

    Configuring JSSE is a rather complex topic, please refer to the JDK platform documentation or the excellent user guide that is part of the Play Framework documentation. The philosophy of this integration into Akka Streams is to expose all knobs and dials to client code and therefore not limit the configuration possibilities. In particular the client code will have to provide the SSLEngine, which is typically created from a SSLContext. Handshake parameters and other parameters are defined when creating the SSLEngine.

    IMPORTANT NOTE

    The TLS specification until version 1.2 did not permit half-closing of the user data session that it transports—to be precise a half-close will always promptly lead to a full close. This means that canceling the plaintext output or completing the plaintext input of the SslTls operator will lead to full termination of the secure connection without regard to whether bytes are remaining to be sent or received, respectively. Especially for a client the common idiom of attaching a finite Source to the plaintext input and transforming the plaintext response bytes coming out will not work out of the box due to early termination of the connection. For this reason there is a parameter that determines whether the SslTls operator shall ignore completion and/or cancellation events, and the default is to ignore completion (in view of the client–server scenario). In order to terminate the connection the client will then need to cancel the plaintext output as soon as all expected bytes have been received. When ignoring both types of events the operator will shut down once both events have been received. See also TLSClosing. For now, half-closing is also not supported with TLS 1.3 where the spec allows it.

  42. object TLSPlacebo

    This object holds simple wrapping implementations that can be used instead of TLS when no encryption is desired.

    This object holds simple wrapping implementations that can be used instead of TLS when no encryption is desired. The flows will just adapt the message protocol by wrapping into SessionBytes and unwrapping SendBytes.

  43. object Tcp extends [] with ExtensionIdProvider
  44. object TcpAttributes
  45. object Unzip

    Takes a stream of pair elements and splits each pair to two output streams.

    Takes a stream of pair elements and splits each pair to two output streams.

    An Unzip has one in port and one left and one right output port.

    Emits when all of the outputs stop backpressuring and there is an input element available

    Backpressures when any of the outputs backpressure

    Completes when upstream completes

    Cancels when any downstream cancels

  46. object UnzipWith extends UnzipWithApply

    Transforms each element of input stream into multiple streams using a splitter function.

    Transforms each element of input stream into multiple streams using a splitter function.

    Emits when all of the outputs stop backpressuring and there is an input element available

    Backpressures when any of the outputs backpressure

    Completes when upstream completes

    Cancels when any downstream cancels

  47. object UnzipWithApply
  48. object WireTap
  49. object Zip
  50. object ZipLatest
  51. object ZipLatestWith extends ZipLatestWithApply

    Combine the elements of multiple streams into a stream of combined elements using a combiner function, picking always the latest of the elements of each source.

    Combine the elements of multiple streams into a stream of combined elements using a combiner function, picking always the latest of the elements of each source. The combined stream completes immediately if some upstreams have already completed while some upstreams did not emitted any value yet. If all upstreams produced some value and the optional parameter eagerComplete is true (default), the combined stream completes when any of the upstreams completes, otherwise, the combined stream will wait for all upstreams to complete.

    No element is emitted until at least one element from each Source becomes available. Whenever a new element appears, the zipping function is invoked with a tuple containing the new element and the other last seen elements.

    Emits when all of the inputs have at least an element available, and then each time an element becomes available on either of the inputs

    Backpressures when downstream backpressures

    Completes when any of the upstreams completes

    Cancels when downstream cancels

  52. object ZipN
  53. object ZipWith extends ZipWithApply

    Combine the elements of multiple streams into a stream of combined elements using a combiner function.

    Combine the elements of multiple streams into a stream of combined elements using a combiner function.

    Emits when all of the inputs has an element available

    Backpressures when downstream backpressures

    Completes when any upstream completes

    Cancels when downstream cancels

  54. object ZipWithN