[akka-user] Passivate Persistent Cluster Singleton

2016-07-19 Thread Siva Kommuri
Hi all! What is the proper way to passivate a persistent cluster singleton? I have the following snippet in the cluster singleton: receive = { case ReceiveTimeout => context.parent ! Passivate(stopMessage=Stop) case Stop => context.stop(self) } I get the following warning in the logs and

[akka-user] Akka Cluster + Leveldb : Persistence failure when replaying events for ...

2016-07-19 Thread Manoj Santhakumaran
Hi All, I'm facing following problem with my Akka cluster environment which has two nodes, and Akka persistence using leveldb-journal. Both nodes are started with "ClusterSingletonManager" and "ClusterSingletonProxy". My "UntypedPersistentActor" is started as "ClusterClientReceptionist". In

[akka-user] Re: actor lookup and restart

2016-07-19 Thread Rob Crawford
I use constructor injection or use the Spring Extension to let Spring inject ActorRefs. Another way is to start with the ActorSelection, then send an Identify message -- the other actor will automatically reply with an ActorIdentity message that contains an ActorRef. On Tuesday, July 19,

Re: [akka-user] Re: Akka WebSocket as an Api

2016-07-19 Thread Konrad Malawski
Wanted to ask about your considerations for tradeoffs for using Play vs straight Akka-Http-Stream and Websockets? Akka is a toolkit. Play is a framework. If it's a "web app" Play would be better. If it's "raw api" I would recommend Akka HTTP though quite honestly it's a personal preference thing

Re: [akka-user] Re: actor lookup and restart

2016-07-19 Thread Konrad Malawski
Don't do static global state, it's a bad code smell in general. -- Konrad `ktoso` Malawski Akka @ Lightbend On 19 July 2016 at 10:05:11, James (breath...@gmail.com) wrote: Thank you Rob, Another way is to pass the actorRef to a static object, which can

[akka-user] Re: actor lookup and restart

2016-07-19 Thread James
Thank you Rob, Another way is to pass the actorRef to a static object, which can be referenced by other instances later. I am wondering which way is better: pass the actoreRef to a class instance or assign the actoreRef to a static attribute in an object. Best, James On Tuesday, July 19,

[akka-user] Re: LevelDB journal plugin and its dispatcher usage

2016-07-19 Thread Johan Andrén
Hi Muthukumaran, Please note that using the LevelDB journal is meant for testing, learning persistence etc, and not for production, for production you should use a real database (Cassandra is a popular distributed example). -- Johan On Sunday, July 17, 2016 at 5:00:13 PM UTC+2, Muthukumaran

Re: [akka-user] Re: one more issue in migration ..

2016-07-19 Thread Debasish Ghosh
Hi Johan - Yes, Source.empty was the problem. Replacing it with Source.maybe fixed it. Will check the halfClosed property that u suggested as well. Thanks. On Tue, Jul 19, 2016 at 12:38 PM, Johan Andrén wrote: > Hi Debashish, > > I'd guess it is because of the

[akka-user] Re: one more issue in migration ..

2016-07-19 Thread Johan Andrén
Hi Debashish, I'd guess it is because of the Source.empty which will complete the outgoing stream, there is a halfClosed property you can set when binding to allow the socket to stay alive even after the writing side close. -- Johan On Saturday, July 16, 2016 at 11:20:50 AM UTC+2, debasish