Skip to content

Instantly share code, notes, and snippets.

@hstraub
Last active September 8, 2015 12:30
Show Gist options
  • Save hstraub/b4b04778c9271f998608 to your computer and use it in GitHub Desktop.
Save hstraub/b4b04778c9271f998608 to your computer and use it in GitHub Desktop.
Akka streams test
import akka.actor._
import akka.stream._
import akka.stream.scaladsl._
import com.typesafe.config.ConfigFactory
val customConf = ConfigFactory.parseString("""
akka.loglevel = "DEBUG"
akka.actor.debug.lifecycle = "on"
akka.actor.debug.receive = "on"
akka.actor.debug.autoreceive = "on"
""")
implicit val system = ActorSystem( "test", customConf )
implicit val mat = ActorFlowMaterializer()
val test = Source( (1 to 100 ).toList )
val flow = test.filter( _ % 2 == 0 ).toMat( Sink.foreach( println ) )(Keep.right)
flow.run
@hstraub
Copy link
Author

hstraub commented Sep 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment