A book dealing only with Akka Streams would be no smaller than this entire book. It’s an important topic, but it’s too extensive to cover fully here. In this chapter, you learn the basics and the cases you will encounter most often in practice.
- The Flow API—Creates simple linear flows that are taken from a source, transformed, and passed to a sink. A typical example is a source that reads Kafka, enriches the event by calling an external service, and publishes it back to Kafka with a sink.
- The GraphDSL—At this level, you can combine multiple streams to create something more complex than a linear stream, namely a graph. An example would be a flow that is fanned out into multiple streams so that in each of these streams, a different service enriches the event; later, all these streams are combined into one flow.
- The GraphStage API—This is the lowest-level API, which the Akka Streams library uses to create GraphDSL and the Flow API. It is very unlikely that you will ever need such a low-level composition.