How to create a Source that can receive elements later via a method call?

There are three ways this can be achieved: 1. Post Materialization with SourceQueue You can use Source.queue that materializes the Flow into a SourceQueue: case class Weather(zipCode : String, temperature : Double, raining : Boolean) val bufferSize = 100 //if the buffer fills up then this strategy drops the oldest elements //upon the arrival of … Read more

How to get started with Akka Streams? [closed]

This answer is based on akka-stream version 2.4.2. The API can be slightly different in other versions. The dependency can be consumed by sbt: libraryDependencies += “com.typesafe.akka” %% “akka-stream” % “2.4.2” Alright, lets get started. The API of Akka Streams consists of three main types. In contrast to Reactive Streams, these types are a lot … Read more