Re: [akka-user] Akka IO over TCP, Spray and MySQL Reactive for Java

2015-03-08 Thread Björn Antonsson
Hi Salim, I have no experience with the postgres-async driver, but for the akka-io TCP server there is information in the akka Java documentation  http://doc.akka.io/docs/akka/2.3.9/java/io-tcp.html Spray is not available for Java, but you could go with akka-http  http://doc.akka.io/docs/akka-st

Re: [akka-user] Stream Materialization, a larger discussion.

2015-03-08 Thread Roland Kuhn
Hi Jim, thanks for starting the discussion! Replies inline. > 5 mar 2015 kl. 21:30 skrev Jim Hazen : > > I've been following Akka Streams for bit. I've noticed the changes in M4 and > of course read the materialization sections of: > http://doc.akka.io/docs/akka-stream-and-http-experimental/1.

Re: [akka-user] Shutting down an akka stream

2015-03-08 Thread Roland Kuhn
Hi Jelmer, instead of the runForeach method you can use the following (which basically does the two steps separately that are packaged in the runForeach convenience): val ref = Source[Int](Props()).groupBy(_ % 2).to(Sink.foreach(_ => ()).run() Regards, Roland > 8 mar 2015 kl. 13:21 skrev Jelm

Re: [akka-user] Shutting down an akka stream

2015-03-08 Thread Jelmer Kuperus
Ok so i played around with it a bit and i get that i can do something like this val actor: ActorRef = Source[Int](Props()).to(Sink.ignore()).run() but as soon as you add grouping to the mix this falls apart. Eg : Source[Int](Props()).groupBy(_ % 2).runForeach(_ => ()) will return a Future[Unit

[akka-user] Is there any idiom for shutting down a router along with its routees?

2015-03-08 Thread Matan Safriel
Hi, Is there a specific way to shutdown a router v.s. a regular Actor? Is there any idiom for shutting down a router along with its routees? Thanks, Matan -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/addit

Re: [akka-user] akka-persistence: persistAsync interaction with snapshots

2015-03-08 Thread Tal Pressman
Hi Björn, Thanks for your reply. Let me see if I understand correctly. If I have an actor with a counter, then this code would be problematic: class MyActor extends PersistentActor { var counter = 0 override def receiveCommand: Receive = { case Increment => counter += 1 // <<< sh