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 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.