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 //

[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/additional/faq.html Search

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

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