February 2018
Intermediate to advanced
552 pages
13h 46m
English
In the Akka Streams API, Sink is a Consumer of streaming data and has only one input and no output.
The main responsibility of a Sink is to consume data elements from Source or Flow only when they are available. Here, we can say Source as Upstream Processing Stage and Sink as Downstream Processing Stage.
Like the Source component, a Sink can also have either only one step or a set of stream-processing steps, depending on our requirements.
In the Akka Streams API, Sink is defined as the final class in the akka.stream.scaladsl package, as shown here:
final class Sink[-In, +Mat] {
// Only In (Input)
}

For outside ...
Read now
Unlock full access