Skip to content

Instantly share code, notes, and snippets.

@oscar-martin
oscar-martin / EventSource.scala
Last active June 5, 2019 15:41
Simple application that shows how to push content into a source externally and also how to work with the materialized views in order to control the source.
import java.util.concurrent.atomic.AtomicBoolean
import akka.Done
import akka.actor.ActorSystem
import akka.event.{Logging, LoggingAdapter}
import akka.stream.scaladsl.{Flow, Keep, Sink, Source}
import akka.stream.{ActorMaterializer, OverflowStrategy}
import scala.concurrent.Future
import scala.sys.process._

Keybase proof

I hereby claim:

  • I am oscar-martin on github.
  • I am omartin (https://keybase.io/omartin) on keybase.
  • I have a public key whose fingerprint is 8776 4937 AD03 351E 4998 CDD3 16A4 40D0 1AE6 A768

To claim this, I am signing this object: