Re: [akka-user] Retry only has meaning for restart in SuperVisorStragety?

2016-08-03 Thread Yan Pei
ave been the actor state that was bad, that will be fixed by > the restart and then it may be reasonable to retry the message, if you > stopped the actor it definitely does not make sense to retry the message as > the actor will be no more. > > -- > Johan > > On Thu, Jul 21, 2

Re: [akka-user] Question about how to use PeekMailBox

2016-08-03 Thread Yan Pei
ors interact with who > contains the retry logic (which messages are in > flight and what child is processing what message, how many retries for a > specific message) and lets the children > just fail without caring about the retry logic. > > -- > Johan > > On Mon, J

[akka-user] Question about how to use PeekMailBox

2016-07-25 Thread Yan Pei
Hello All, I am trying to use PeekMailBox for retrying after the message processing failed. In the Actor, I am using Future to delivery the message for processing and piping the result back to itself. Do some matching(Failure or something else) after that. Where am I supposed to put

[akka-user] Retry only has meaning for restart in SuperVisorStragety?

2016-07-21 Thread Yan Pei
Hello, From the doc and my testing, looks like "retry only is meaningful if I want to restart the Actor? For resume() it will not apply the retry? Do I understand it correctly? Thanks, Yan -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

Re: [akka-user] LEAK: You are creating too many HashedWheelTimer instances

2016-07-05 Thread Yan Pei
he Cassandra driver is doing, e.g. scheduling > reconnects or something. > > /Patrik > > On Fri, Jul 1, 2016 at 7:59 PM, Yan Pei <yan...@gmail.com > > wrote: > >> We run this application via a scheduler, every three hours. We did >> shutdown ActorSystem at t

Re: [akka-user] LEAK: You are creating too many HashedWheelTimer instances

2016-07-01 Thread Yan Pei
ou may be creating new ActorSystem instances instead > of reusing a single one. > > -- > Cheers, > √ > On Jul 1, 2016 7:05 PM, "Yan Pei" <yan...@gmail.com > wrote: > >> Hello All, >> >> I am using AKKA 2.4.4 and Cassandra 2.x. >> Today I fo

[akka-user] LEAK: You are creating too many HashedWheelTimer instances

2016-07-01 Thread Yan Pei
Hello All, I am using AKKA 2.4.4 and Cassandra 2.x. Today I found there is an error from the thread of 'actor-system-cassndra-plugin-default-dispatcher-380': LEAK: You are creating too many HashedWheelTimer instances. HashedWheelTimer is a shared resource that must be reused across the

Re: [akka-user] Re: Do I have to shutdown AKKA system after each execution

2016-06-16 Thread Yan Pei
n at least the basic life-cycles, you know the old saying? RTMF? >> >> >> On Wednesday, June 15, 2016 at 6:46:40 PM UTC+1, Yan Pei wrote: >>> >>> only if AKKA got shutdown the actors got killed right? But for each run, >>> do I have to recreate actor then kill then at t

[akka-user] Re: Do I have to shutdown AKKA system after each execution

2016-06-15 Thread Yan Pei
t 5:43:20 PM UTC+1, Yan Pei wrote: >> >> Thank you Guido. If I don't shutdown akka system, should I also not kill >> the actors under the akka system? >> >> On Wednesday, June 15, 2016 at 9:42:44 AM UTC-5, Guido Medina wrote: >>> >>> Nope, i

[akka-user] Re: Do I have to shutdown AKKA system after each execution

2016-06-15 Thread Yan Pei
estructor method = terminate. > > On Tuesday, June 14, 2016 at 5:29:29 PM UTC+1, Yan Pei wrote: >> >> Hello All, >> >>I've designed the application with AKKA + Spring Framework IOC + >> Spring Scheduler. Currently I shutdown the AKKA system for each run a

[akka-user] Do I have to shutdown AKKA system after each execution

2016-06-14 Thread Yan Pei
Hello All, I've designed the application with AKKA + Spring Framework IOC + Spring Scheduler. Currently I shutdown the AKKA system for each run and recreate it in the next execution when the scheduler invokes. Is it the correct approach? Thanks, Yan -- >> Read the docs:

[akka-user] Spring Scheduler with AKKA: connot create children while terminating or terminated

2016-05-26 Thread Yan Pei
I am using Spring IOC to inject Beans and created the instance inside actorSystem. actorSystem.actorOf(SpringExtProviderInstance.get(actorSystem).props( "mainActor"), "mainActor"); After Spring Scheduler running, things are good in the first run, but the second run triggered the above

Re: [akka-user] ConfigFactory parses String as List

2016-05-25 Thread Yan Pei
-5, Patrik Nordwall wrote: > > Try to use a java.util.List as the value for the contact points > configuration. One address in each element of the list. I'm not sure if it > works. > > /Patrik > tis 24 maj 2016 kl. 23:35 skrev Yan Pei <yan...@gmail.com >: > >&g

[akka-user] ConfigFactory parses String as List

2016-05-24 Thread Yan Pei
I am trying to dynamically set up value for cassandra-journal.contact-points. If I am using ConfigFactory.parseString(). It works well. String name = "cassandra-journal.contact-points="; String contactPoints = name + "[ipaddress, ipaddres]"; Config overrides =

Re: [akka-user] Does SupervisorStrategy know which child actor throwing exception for piped future result?

2016-05-16 Thread Yan Pei
contained exception. Then the parent supervisor will handle it. > /Patrik > fre 13 maj 2016 kl. 16:53 skrev Yan Pei <yan...@gmail.com >: > >> Endre, >> The following is suggested by Patrik the other day in other post: >> >>"The API sho

Re: [akka-user] Does SupervisorStrategy know which child actor throwing exception for piped future result?

2016-05-13 Thread Yan Pei
e parent supervisor will handle it. > /Patrik > fre 13 maj 2016 kl. 16:53 skrev Yan Pei <yan...@gmail.com >: > >> Endre, >> The following is suggested by Patrik the other day in other post: >> >>"The API should return a Future that you can pipe back the res

Re: [akka-user] Does SupervisorStrategy know which child actor throwing exception for piped future result?

2016-05-13 Thread Yan Pei
and then the returned directive is > used to determine how to proceed. > > -Endre > > On Thu, May 12, 2016 at 5:30 PM, Yan Pei <yan...@gmail.com > > wrote: > >> Good morning, >> >> The child actor gets a Future for a API call, then the Future being p

Re: [akka-user] akka persistence AtLeastOnceDelivery SupervisorStratege, RedeliveryTick and ReceiveTimeout

2016-05-13 Thread Yan Pei
://github.com/akka/akka/issues/16629 > > I don't think so, that looks different to me. Honestly, I think there is > 99% chance that the bug is in your code (given that supervision was not > seeing a single bug in the last two years). Can you provide a simple > reproducer of the is

Re: [akka-user] Does SupervisorStrategy know which child actor throwing exception for piped future result?

2016-05-13 Thread Yan Pei
directive but not do anything else. The strategy is invoked > by the actor cell if a child actor fails and then the returned directive is > used to determine how to proceed. > > -Endre > > On Thu, May 12, 2016 at 5:30 PM, Yan Pei <yan...@gmail.com > > wrote: > >

[akka-user] Does SupervisorStrategy know which child actor throwing exception for piped future result?

2016-05-12 Thread Yan Pei
Good morning, The child actor gets a Future for a API call, then the Future being piped back to it's parent actor. After match(Failure.class) is true, the Parent actor call this.supervisorStragety().decider().apply(throwable); My question is if the parent's supervisorStragety knows which

Re: [akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-11 Thread Yan Pei
Nordwall wrote: > > > > On Tue, May 10, 2016 at 9:47 PM, Yan Pei <yan...@gmail.com > > wrote: > >> Thank you Patrik, >> >> The reason I put Thread.sleep() here is to simulate the real use case >> in which our KidActor needs to call a third party API an

Re: [akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-10 Thread Yan Pei
after the sleep? > > In general, don't block actor execution since it will not be able to react > on any messages while it's blocked. Supervision is also based on messages. > > /Patrik > > On Tue, May 10, 2016 at 9:20 PM, Yan Pei <yan...@gmail.com > > wrote: > >&

[akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-10 Thread Yan Pei
Below is a simple AKKA SupervisorStrategy example: The SupervisorStrategy catchs the exception thrown from ChildActor with short time sleep in ChildActor.java, but it will not catch it if the Thread.sleep() is too long like below. The message will not be delivered to ChildActor for the long

[akka-user] akka persistence AtLeastOnceDelivery SupervisorStratege, RedeliveryTick and ReceiveTimeout

2016-05-10 Thread Yan Pei
Still have the problem with Parent Actor's supervisorStratege couldn't catch the exception thrown by kid actor when the exception happend after long time processing in kid actor. >From the Log, I can see [INFO] [05/10/2016 02:03:52.301] [arachne-actor-system-akka.actor.default- dispatcher-25]

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
{ Thread.sleep(1000l); } catch (InterruptedException e) {} throw new Exception("testing..."); }catch(Exception e){ throw new RuntimeException("testing"); } On Monday, May 9, 2016 at 1:46:36 PM UTC-5, Yan Pei wrote: >

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
then re-throw runtimeexcetion, seems like the parent actor wouldn't catch it. Thanks a lot! Yan On Monday, May 9, 2016 at 12:49:53 PM UTC-5, Patrik Nordwall wrote: > > That should be possible. Can you post a full gist of a minimized example > that shows what you are doing? > > On

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
handled(msg); } } } On Monday, May 9, 2016 at 12:49:53 PM UTC-5, Patrik Nordwall wrote: > > That should be possible. Can you post a full gist of a minimized example > that shows what you are doing? > > On Mon, May 9, 2016 at 6:37 PM, Yan Pei <yan...@gmail.com > > wrote:

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
9, 2016 at 7:32:32 AM UTC-5, Patrik Nordwall wrote: > > Where does it throw the exception? If it's during recovery the persistent > actor will be stopped. > http://doc.akka.io/docs/akka/2.4.4/java/persistence.html#Failures > > Regards, > Patrik > > On Sat, May 7, 201

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
akka.io/docs/akka/2.4.4/java/persistence.html#Failures > > Regards, > Patrik > > On Sat, May 7, 2016 at 12:39 AM, Yan Pei <yan...@gmail.com > > wrote: > >> Hello, >> >> I am having a problem to apply SupervisorStrategy to an Actor. >> >> The

Re: [akka-user] snapshot's sequence_nr is 0 for first time running

2016-04-29 Thread Yan Pei
Patric, The problem was gone if I send lots of messages. Thanks, Yan On Thursday, April 28, 2016 at 5:21:11 AM UTC-5, Patrik Nordwall wrote: > > what does your persistent actor look like? > > On Mon, Apr 25, 2016 at 7:23 PM, Yan Pei <yan...@gmail.com > > wrote: &

[akka-user] snapshot's sequence_nr is 0 for first time running

2016-04-25 Thread Yan Pei
Got another issue. The logic is very simple: after sending certain number of messages, take a snapshot. But the sequence_nr is always 0 for the first time run. The second time, I saw some positive numbers in sequce_nr but the number is not what I am expecting. persistence_id

Re: [akka-user] akka persistence actor and memory issue

2016-04-25 Thread Yan Pei
Patrik, Got it. Thank you! Yan On Friday, April 22, 2016 at 10:44:27 AM UTC-5, Patrik Nordwall wrote: > > No, each persistent actor will only replay its own events. The > persistenceId is part of the key in the cassandra table. > fre 22 apr. 2016 kl. 16:53 skrev Yan Pei <y

Re: [akka-user] akka persistence actor and memory issue

2016-04-22 Thread Yan Pei
Nordwall wrote: > > > > On Thu, Apr 21, 2016 at 11:53 PM, Yan Pei <yan...@gmail.com > > wrote: > >> Hi All, >> >>If I have lots of persistence actors in the ActorSystem, during >> recovering each instance of actor will read the same set of data int

[akka-user] akka persistence actor and memory issue

2016-04-21 Thread Yan Pei
Hi All, If I have lots of persistence actors in the ActorSystem, during recovering each instance of actor will read the same set of data into memory, potentially is it an issue? I have concern that it might cause OutOfMemory exception for a large load of data. Thanks, Yan -- >>

Re: [akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-21 Thread Yan Pei
e other issue. > > -Endre > > On Tue, Apr 19, 2016 at 6:03 PM, Yan Pei <yan...@gmail.com > > wrote: > >> Endre, >> This is good to know. Could you please let me know how to configure it >> as daemonic? >> Thanks, >> Yan >> >> On Tuesday, A

Re: [akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-19 Thread Yan Pei
gt; > -Endre > > On Mon, Apr 18, 2016 at 10:02 PM, Yan Pei <yan...@gmail.com > > wrote: > >> John, >> >> After I upgrade AKKA to 2.4.4 and AKKA persistence cassandra to 0.12, >> the system.terminate() works well now. >> >> Thank you very mu

[akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-18 Thread Yan Pei
cassandra? It sounds unlikely, but of course not impossible, that there > would be something in the Cassandra driver blocking and stopping your actor > system from stopping. > > -- > John Andrén > Akka Team, Lightbend Inc. > > On Monday, April 18, 2016 at 7:55:14 PM UTC+2, Yan Pe

[akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-18 Thread Yan Pei
end Inc. > > > On Monday, April 18, 2016 at 5:53:17 PM UTC+2, Yan Pei wrote: >> >> ActorSystem.terminate() works well with certain number of actors inside >> the system. >> >> Once I increase the actor number, the system().terminate() couldn't >

[akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-18 Thread Yan Pei
on by connecting to > the JVM and taking a thread dump - this should show at least one thread > having a call stack into one of your actors. > > -- > Johan Andrén > Akka Team, Lightbend Inc. > > > On Monday, April 18, 2016 at 5:53:17 PM UTC+2, Yan Pei wrote: >> >

[akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-18 Thread Yan Pei
d be able to see what is going on by connecting to > the JVM and taking a thread dump - this should show at least one thread > having a call stack into one of your actors. > > -- > John Andrén > Akka Team, Lightbend Inc. > > > On Monday, April 18, 2016 at 5:53:17 PM UTC+2

[akka-user] ActorSystem.terminate() couldn't fully terminate the system

2016-04-18 Thread Yan Pei
ActorSystem.terminate() works well with certain number of actors inside the system. Once I increase the actor number, the system().terminate() couldn't terminate the system, the application just hung on there and I have to manually kill it. (running from Eclipse) >From the log it's trying to:

Re: [akka-user] AKKA persistence with big loading issue

2016-04-15 Thread Yan Pei
ly be out of it. > > /Patrik > > tors 14 apr. 2016 kl. 22:40 skrev Yan Pei <yan...@gmail.com > >: > >> It's better after I change to use persistAsync() instead of persist(). >> What risk we might have to use persistAysnc()? The document says low >> consisten

Re: [akka-user] AKKA persistence with big loading issue

2016-04-15 Thread Yan Pei
tors 14 apr. 2016 kl. 22:40 skrev Yan Pei <yan...@gmail.com > >: > >> It's better after I change to use persistAsync() instead of persist(). >> What risk we might have to use persistAysnc()? The document says low >> consistence. is it message loss or sending message m

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Yan Pei
It's better after I change to use persistAsync() instead of persist(). What risk we might have to use persistAysnc()? The document says low consistence. is it message loss or sending message more than once? On Thursday, April 14, 2016 at 10:13:32 AM UTC-5, Yan Pei wrote: > > The str

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Yan Pei
lightbend.com> > > On 14 April 2016 at 16:51:30, Yan Pei (yan...@gmail.com ) > wrote: > > Hello Konrad, > > I am doing POC, each message is a very short String. I am using akka > with version 2.11-2.4.2. The messages is being sent out in a loop but with > sleep for

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Yan Pei
gt; Hi there, > we'll need more details on message size, versions, and timing of the > messages to be able to hint at anything :) > > -- > Konrad `ktoso` Malawski > Akka <http://akka.io> @ Lightbend <http://lightbend.com> > > On 14 April 2016 at 16:38:57, Yan

[akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Yan Pei
Good Morning All, I am having issue with AKKA persistence cassandra load testing. If I send out more than 2 message to the AKKA system, it will not handle that well. I have created different persistent actors to handle around 1500 msg for each. But even I did that, looks like AKKA system

Re: [akka-user] Re: Cloud Foundry + AKKA Cluster

2016-04-05 Thread Yan Pei
thank you Patrick. On Tuesday, April 5, 2016 at 2:15:53 PM UTC-5, Patrik Nordwall wrote: > > 127.0.0.1 will only work on one machine (localhost). > Read more: > http://doc.akka.io/docs/akka/2.4.3/java/cluster-usage.html#Joining_to_Seed_Nodes > tis 5 apr. 2016 kl. 20:48 skr

Re: [akka-user] Re: Cloud Foundry + AKKA Cluster

2016-04-05 Thread Yan Pei
answer or knows how Cassandra in CF works I would > also be curious to know. > > /Patrik > > tis 5 apr. 2016 kl. 18:12 skrev Yan Pei <yan...@gmail.com >: > >> The problem we are facing right now is how to get the IP for node >> instance running inside CF sin

[akka-user] Re: Cloud Foundry + AKKA Cluster

2016-04-05 Thread Yan Pei
ate("example", config); ActorRef backend = system.actorOf(Props.create(ActorExample.class, customers, chunk), "backend"); Can I create different ActorExample instance in different nodes? Thanks a lot! Yan On Monday, April 4, 2016 at 12:17:25 PM UTC-5, Yan Pei wrote: > > If we

[akka-user] Cloud Foundry + AKKA Cluster

2016-04-04 Thread Yan Pei
If we want to deploy our AKKA application to CF with CF's load balancer, should we configure the locad balancer ip in side our AKKA application.conf? How do we dynamically configure ip address for seed-nodes? Thanks for any inputs! Emily -- >> Read the docs: http://akka.io/docs/

[akka-user] Re: Akka Persistence with Cassandra

2016-04-04 Thread Yan Pei
Does your cassandra run in local? On Monday, April 4, 2016 at 7:59:58 AM UTC-5, Madabhattula Rajesh Kumar wrote: > > > Hi, > > I am not able to connect Cassandra journal from Akka Persistence. Please > find below my application.conf and exception details. > > Could you please help me to

[akka-user] Re: issue with receiveRecover and router

2016-04-01 Thread Yan Pei
We redesign our application to not configure router for the persistent Actor. On Friday, April 1, 2016 at 9:29:38 AM UTC-5, Yan Pei wrote: > > I've configured a router for one of my persistent Actor in the > application.conf. > > for example: > > deployment { >

[akka-user] issue with receiveRecover and router

2016-04-01 Thread Yan Pei
I've configured a router for one of my persistent Actor in the application.conf. for example: deployment { "/my-router" { router = round-robin-pool nr-of-instances = 2 } } >From the log, I can see both of the instance were started. [INFO] [04/01/2016

[akka-user] akka persistence cassandra question

2016-03-31 Thread Yan Pei
I am new to AKKA. I did some researches but don't find the answer I wanted. Maybe I don't know what keywords to search for. The scenario is we are trying to use akka persistence cassandra plugin to save the incoming messages to cassandra in case the Actor is stopped or the server is down, the

Re: [akka-user] AKKA Persistence Cassandra is always always trying to connect 127.0.0.1 with cassandra-journal.contact-points setup

2016-03-29 Thread Yan Pei
Patrick, you're right. I made the error gone after removing the prefix. Thanks, Emily On Tuesday, March 29, 2016 at 3:07:07 PM UTC-5, Yan Pei wrote: > > Thank you Patrik. > > After removing akka.persistence prefix from > cassandra-journal.contact-points, I got the same error plus

Re: [akka-user] AKKA Persistence Cassandra is always always trying to connect 127.0.0.1 with cassandra-journal.contact-points setup

2016-03-29 Thread Yan Pei
ds, Emily On Tuesday, March 29, 2016 at 2:54:06 PM UTC-5, Patrik Nordwall wrote: > > Wrong config. Try > cassandra-journal.contact-points > without the akka.persistence prefix > > /Patrik > > tis 29 mars 2016 kl. 21:19 skrev Yan Pei <yan...@gmail.com >: > >&g

[akka-user] AKKA Persistence Cassandra is always always trying to connect 127.0.0.1 with cassandra-journal.contact-points setup

2016-03-29 Thread Yan Pei
Hello ALL, I am on my wits end to get this issue figured out by myself. Any suggestion would be appreciated. The followings are information for what I am using: * AKKA 2.4.2* *Cassendra 2.6* * Akka-persistence-cassandra 0.11* applicaton.conf