Last active
September 8, 2015 12:30
-
-
Save hstraub/b4b04778c9271f998608 to your computer and use it in GitHub Desktop.
Akka streams test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentaion:
*Akka Streams Introduction
*Comparing akka-stream and scalaz-stream with code examples