“Dead letters encountered” as soon as actors are placed into router

前端 未结 3 468
南笙
南笙 2021-01-01 00:01

Here\'s what I\'m finding, and for the life of me I can\'t navigate to the reason. I\'m creating \"printer\" actors that basically either do nothing, or print a message bas

相关标签:
3条回答
  • 2021-01-01 00:34

    One solution is to use the Scheduler, and instead of

    context.stop(self)
    

    use:

    system.scheduler.scheduleOnce(1 second) {
      self ! PoisonPill
    }
    
    0 讨论(0)
  • 2021-01-01 00:46

    I ran into the same problem with my akka project. Here is my question "Dead Letters encountered" error while running AKKA remote actors

    Generally dead letter encountered occurs when there is no more worker actor to receive the message sent by master. You should make sure your worker actor is alive when your master is sending it a task or message.

    0 讨论(0)
  • 2021-01-01 00:56

    What you are seeing here is that DeathWatchNotifications are not processed, meaning that the actor (the Router) was still watching its children when it terminated. This is not automatically a sign of trouble as documented (but we should make it clearer in the case of this particular message). In this case the only way to get rid of this message is to make sure that router and routees do not terminate "at the same time".

    0 讨论(0)
提交回复
热议问题