liveBook · Manning

Akka Streams

As explained in Akka in Action, Second Edition

Akka Streams is an Akka library for processing bounded or unbounded streams of data with asynchronous, backpressured pipelines.

Akka Streams processes data through asynchronous pipelines while preventing a fast producer from overwhelming a slower consumer. Its backpressure model lets downstream consumers signal how much data they can handle before upstream producers send it. section 10.1

A basic stream is assembled from three stages:

A persistence-to-view pipeline

A stream can read events from a persistence journal, transform or enrich them, and write results into another table to create a view. A similar Flow API pipeline can read from Kafka, enrich events through an external service, and publish them back to Kafka. section 10.0 section 16.0

Figure 10.1 Consumer signaling that it’s ready to consume three messages
CH10_F01_Abraham2

The consumer-signaling diagram shows how downstream demand controls upstream delivery and makes backpressure concrete. section 10.1

The Flow API handles simple linear pipelines. More complex arrangements use GraphDSL to combine streams into graphs, while GraphStage provides the lower-level composition API used to build the other two layers. section 16.0

How Akka in Action, Second Edition covers it

How deep it goes
Explains producer-consumer backpressure and the Source, Flow, and Sink stages, while deferring most low-level GraphStage composition.
Examples
Uses journal-to-table views, Kafka enrichment, consumer demand signaling, and linear, fan-out, and merged stream arrangements.
What you can do after
Build asynchronous pipelines with Source, Flow, and Sink, then choose GraphDSL for more complex stream graphs.
How it connects
Connects Reactive Streams with persistence queries, projections, Kafka, Flow API, GraphDSL, GraphStage, and external services.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Akka in Action, Second Edition. The section links point to the parts of the book it draws on.