Hi All,
I do not very understand the UntypedPersistentActor. I have 2 questions
*question 1*: we have to overide the method persistenceId. It can return
any String value, but must be unique, right?
@Override
public String persistenceId() {
return "test-id-1";
}
*question 2*: I have the below test code. When throws exception in the
actor(refer to the red color code), I believe the variable dataList will be
recovered.
But I debugged the code, the dataList wasn't revocered. *Did I miss
anything?*
public class DemoAggregatorActor extends UntypedPersistentActor {
private List<String> dataList = new ArrayList<String>(100);
@Override
public void onReceiveRecover(Object msg) {
if (msg instanceof String) {
dataList.add((String)msg);
} else {
unhandled(msg);
}
}
@Override
public void onReceiveCommand(Object message) throws Exception {
dataList.add("test");
if(dataList.size()>10){
*throw new Exception();*
}
}
}
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.