java - Akka - restart of supervised actors -


I am using Akka (Java) in my project to provide a retry plan. So I have a supervisor actor, who gets a message when he goes to a supervised actor is one (unconditionally) one to resume on the supervisor for each strategy.

The supervised actor has a pre-station hook, which sends the message to itself.

@ Override Public Zero PredeWest (Iron reason, option messages) {// send to the supervisor) to try it again Can be pressed once again (Reason). {Log. Terror ("Do not try again because there seems to be a problem with SQL!"); Super. Prerestate (cause, message); } Else {log.warn ("+ + state +" is trying to redo a resource: "+ ((RecordData) message.get (). GetRecord ()); GetSelf (). Get (), getSender (); super. Prerest (cause, message);}}

Now I want to preserve the status of the failed actor I understand that if my strategy is 'resumed' then only the state will be protected, but in that case the restart hook will not be applied and the message will be lost.

The question :

1. Is this the only way to achieve this goal, to set and restart the state in the message itself?

2 If the state holds a sequential order, So I need to provide a 'ordered' mailbox implementation (dequeue based). Is this correct?

I doubt whether you can send a message for an actor who is in the past.

Your strategy is this Mr. requires that actors be reset to crash / restart. If you want to keep the internal state, you have to pass it elsewhere (other actor, database) to start a new actor to ask it again.

Why not really in some logic supervisor?

I will post some example code here, if I knew how you are using Akaka.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -