Akka Stream is now part of standard Akka package and should be imported in build.sbt
file as following:
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % "2.4.4"
)
Introduction to Akka Streams
Reactive Tweets
Testing Streams
Working with Graphs
Working with Stream IO
Following methods actorSystem.shutdown()
and actorSystem.awaitTermination()
are deprecated in Akka version 2.4.x
. So following code:
actorSystem.shutdown()
actorSystem.awaitTermination()
Should be replaced with the following code:
import scala.concurrent.Await
import scala.concurrent.duration._
Await.result(actorSystem.terminate(), 10.seconds)
As well as following import is not working in newer version of Akka:
import system.dispatcher
Following import should be used instead:
import scala.concurrent.ExecutionContext.Implicits.global
Akka Streams went through experimental releases from 1.0
to 2.0.2
and finally ended up in official Akka release at the time of writing 2.4.4
.