In the book <<Akka Java Documentation, Release 2.3.10>> says that
"If there is a problem with recovering the state of the actor from the
journal, the actor will be sent a RecoveryFailure message that it can
choose to handle in receiveRecover. If the actor doesn’t handle the
RecoveryFailure message it will be stopped"
But int the function onReceiveRecover,my code is following:
public void onReceiveRecover(Object msg) {
// TODO Auto-generated method stub
log.info("MyPersistentTest onReceiveRecover" );
State st = this._currentState();
log.info("my state: {}", st);
try {
if (msg instanceof myInfo) {
myInfo evt = (myInfo) msg;
log.info("get recover msg {}" ,evt);
} else if (msg instanceof SnapshotOffer) {
System.out.println("After get snapshot msg " );
} else if (msg instanceof RecoveryFailure) {
try {
RecoveryFailure evt = (RecoveryFailure) msg;
System.out.println(evt.cause());
recoveryCompleted();
//log.info("my state: {}", st);
//super.preStart();
} catch (InvalidClassException e) {
log.info("InvalidClassException: {}", e);
//e.printStackTrace();
}
//unhandled(msg);
}
else if (msg instanceof RecoveryCompleted) {
System.out.println("RecoveryCompleted" );
//recoveryCompleted();
//onRecoveryComplete();
//st = this._currentState();
//log.info("my state {}", st);
}
else {
System.out.println("unhandled" );
//unhandled(msg);
}
} catch (Exception e) {
System.out.println("Exception" );
e.printStackTrace();
}
}
why my persist actor can not receive RecoveryCompleted msg.
--
>>>>>>>>>> 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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.