If you were playing with reactive-stream, and you got this error
scala> val sum = source.runWith(sink)
<console>:14: error: could not find implicit value for parameter materializer: akka.stream.FlowMaterializer
You need an implicit FlowMaterializer
def runWith[Mat2](sink: Graph[SinkShape[Out], Mat2])(implicit materializer: FlowMaterializer): Mat2
runWith expects an implicit that implements the abstract class FlowMaterializer. You can use ActorFlowMaterializer
.
import akka.actor.ActorSystem
import akka.stream.ActorFlowMaterializer
implicit val system = ActorSystem("Sys")
implicit val materializer = ActorFlowMaterializer()
Ref: