Hi, I'm developing a system based on Akka and I got stuck with situation which is completely unclear for me. I have three actors with following hierarchy: Root actor -> SubPathProcessingSupervisor -> SubPathFinderActor. Root actor creates "SubPathProcessingSupervisor " one during preStart and then tries to send message to it using ask pattern.
//Root actor @Override public void preStart() throws Exception { super.preStart(); this.subPathProcessingSupervisor = context().actorOf(Props.create(SubPathProcessingSupervisor.class)); this.pathModelsAggregatorSupervisor = context().actorOf(Props.create(PathModelsAggregatorSupervisor.class)); this.waitingDuration = (int)readConfig("akka.actor.timeouts", "subPathFindingAskDuration", 5000); } //... private Iterable<Future<Object>> process(ConfiguredPathProcessingRequest request) { Collection<Future<Object>> result = new ArrayList<>(); for (int ceSize = request.minCoverElementSize; ceSize <= request.path.getMaxCoverElementSize(); ceSize += 2) { for (int segSize = request.minCoverElementSize; segSize <= ceSize; segSize += 2) { Future<Object> future = Patterns.ask(subPathProcessingSupervisor, new SubPathProcessingRequest(request.path, ceSize, segSize), waitingDuration); result.add(future); } } return result; } SubPathProcessingSupervisor has following structure: public class SubPathProcessingSupervisor extends LoggingActor{ @Override public void onReceive(Object o) throws Exception { logger.info("SubPathProcessingSupervisor : Message received..."); if(o instanceof SubPathProcessingRequest) { ActorRef subPathProcessorActor = context().actorOf(Props.create(SubPathFinderActor.class)); subPathProcessorActor.forward(o, context()); } else { unhandled(o); } } } >From time to time, when I am trying to debug my application I see following messages: Either: > [INFO] [05/03/2015 13:43:48.413] > [application-akka.actor.default-dispatcher-9] > [akka://application/user/localProcessor/$a/$a/$b/$a/$a/$a] Message > [kernel.modeller.data.messages.SubPathProcessingRequest] from > Actor[akka://application/temp/$a] to > Actor[akka://application/user/localProcessor/$a/$a/$b/$a/$a/$a#342530440] > was not delivered. [1] dead letters encountered. This logging can be turned > off or adjusted with configuration settings 'akka.log-dead-letters' and > 'akka.log-dead-letters-during-shutdown'. Or: > [INFO] [05/03/2015 13:44:18.962] > [application-akka.actor.default-dispatcher-2] > [akka://application/user/localProcessor/$b/$a/$b/$b/$a] Message > [kernel.modeller.data.messages.SubPathProcessingRequest] from > Actor[akka://application/temp/$c] to > Actor[akka://application/user/localProcessor/$b/$a/$b/$b/$a#-285620982] was > not delivered. [3] dead letters encountered. This logging can be turned off > or adjusted with configuration settings 'akka.log-dead-letters' and > 'akka.log-dead-letters-during-shutdown'. I am really confused with this issue because there are some successful attempts... But in most cases messages were not delivered to SubPathProcessingSupervisor, and very rarely from supervisor to SubPathFinderActor. Each attempt may have different results with the same input. Could you please help me to understand what is going on here? -- >>>>>>>>>> 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.