May 2017
Intermediate to advanced
414 pages
13h
English
For this recipe, perform the following steps:
package com.packt.chapter8 import akka.stream.{Attributes, FlowShape, Inlet, Outlet} import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} import com.packt.chapter8. WorkingWithGraphsApplication.GenericMsg class StatefulCounterFlow extends GraphStage[FlowShape[Seq[GenericMsg], Int]] { val in: Inlet[Seq[GenericMsg]] = Inlet("IncomingGenericMsg") val out: Outlet[Int] = Outlet("OutgoingCount") override val shape: FlowShape[Seq[GenericMsg], Int] = FlowShape(in, out) override ...
Read now
Unlock full access