Running a Pipeline
Materialize and execute a graph.
From Blueprint to Execution
So far the pipeline has been a pure blueprint. Materialization is the process that turns that blueprint into running actors that actually move data.
Nothing happens until you explicitly run the graph, which is what makes Akka Streams composable and reusable.
The ActorSystem
Materialization requires an ActorSystem, which provides the threads and dispatcher that back the stream's stages. In modern Akka, the system also acts as the implicit materializer.
One ActorSystem typically serves an entire application and many concurrent streams.
import akka.actor.ActorSystem
implicit val system: ActorSystem =
ActorSystem("data-pipeline")
import system.dispatcher // ExecutionContextAll lessons in this course
- Source, Flow, and Sink
- Transforming Streams
- Backpressure
- Running a Pipeline