Developing Akka Dynamic Streams

Before integrating Akka Streams into our Play web application, in this section, we will develop and explore Akka Streams Dynamic components with one simple example.

Perform the following steps to explore Akka Streams Dynamic components:

  1. Create a Scala SBT project in your favorite IDE:
      Project Name: akka-dynamic-streams-scala-app.
  1. Add the akka-streams dependency in the build.sbt file as shown here:

build.sbt

      name := "akka-dynamic-streams-scala-app"      version := "1.0.0"      scalaVersion := "2.12.4"      libraryDependencies ++= Seq(       "com.typesafe.akka" %% "akka-stream" % "2.5.9"      )
  1. Develop and test AkkaStreamsMergeHubApp, as shown here:
      object AkkaStreamsMergeHubApp extends App{ implicit val actorSystem = ActorSystem("MergeHubSystem") ...

Get Scala Reactive Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.