I have Spring MVC controller class in my application which creates top 
level Akka actor (via Spring). When this actor throws an exception I expect 
it to be handled by the controller, but in my case the actor simply times 
out after 5 sec. I tried to implement my 
 own SupervisorStrategyConfigurator which I put into my Akka configuration 
file like this: 
akka.actor.guardian-supervisor-strategy = 
"com....akka.GuardianActorSupervisorStrategyConfigurator"
but it does not seem to have any effect 

This is the way I instantiate Akka in my rest controller:
public class MyRestController {
    
    @Autowired
    private ActorSystem system;

    @Autowired
    private AkkaSpringExtension extention;

    private ActorRef persistenceActor;
    
    @PostConstruct
    public void init()  {
        try {
            persistenceActor = 
system.actorOf(extention.props("persistenceActor").withRouter( new 
FromConfig()), "persistenceActor");
        } catch (Throwable e) {
            ...
        }        
    }    

....
}

inside controller's method I call persistenceActor.tell(message, null);

When my actor throws an exception the controller gets AkkaTimeoutException 
instead of the exception thrown by the actor.

I am wondering how can I force my actor to escalate the exception to the 
rest controller? Putting escalate() into my 
GuardianActorSupervisorStrategyConfigurator does not seem to be working

Thanks,

Mark

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to