How to do it...

For this recipe, perform the following steps:

  1. Create a file named PipeliningParallelizing.scala inside the com.packt.chapter8 package. This trait contains all the stages necessary to form our different applications. The content should look like this:
        package com.packt.chapter8        import akka.NotUsed        import akka.actor.ActorSystem        import akka.stream.{ActorMaterializer, FlowShape}        import akka.stream.scaladsl.{Balance, Flow,        GraphDSL, Merge, Sink, Source}        import scala.util.Random        trait PipeliningParallelizing extends App {          implicit val actorSystem =             ActorSystem("PipeliningParallelizing")          implicit val actorMaterializer = ActorMaterializer()          case class Wash(id: Int)          case class Dry(id: Int)          case class Done(id: Int)          val tasks 

Get Akka Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.