Skip to Content
Scala Reactive Programming
book

Scala Reactive Programming

by Rambabu Posa
February 2018
Intermediate to advanced
552 pages
13h 46m
English
Packt Publishing
Content preview from Scala Reactive Programming

The Akka Streams Flow component

In the Akka Streams API, Flow is a connector or mediator between Source and Sink for streaming data and has one input and one output.

Akka Streams' Flow is used to connect a Source to a Sink and is responsible for doing one or more of the following operations:

  • Analyzing data elements
  • Updating/reading/deleting data elements
  • Transforming data elements into a required format
  • Grouping/mapping/filtering data elements and more

In the Akka Streams API, Flow is defined as a final class in the akka.stream.scaladsl package, as shown here:

final class Flow[-In, +Out, +Mat] {  
  // Both In (Input) and Out (Output) 
} 

We can understand this Flow component by going through the following diagram:

Unlike the Source and Sink ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Scala Programming Projects

Scala Programming Projects

Mikael Valot, Nicolas Jorand
Learning Scala

Learning Scala

Jason Swartz
Functional Programming in Scala

Functional Programming in Scala

Runar Bjarnason, Paul Chiusano

Publisher Resources

ISBN: 9781787288645Supplemental Content