Introduction to Akka Streams

Akka Streams allow processing of data as streams with backpressure for better resource management.

Basic Stream

import akka.stream.scaladsl._
import akka.actor.ActorSystem
import akka.stream._

implicit val system = ActorSystem("StreamSystem")
implicit val materializer = Materializer(system)

val source = Source(1 to 5)
val sink = Sink.foreach[Int](println)
source.runWith(sink)

Use Source, Flow, and Sink to build reactive pipelines.

← PrevNext →