服务器上的Akka Actor未向Identify消息返回ActorIdentity响应

时间:2015-04-04 07:50:25

标签: scala akka actor remote-actors akka-remote-actor

所以我有这段代码

def receive = identifying

def identifying: Actor.Receive = {
    case ActorIdentity(`path`, Some(actor)) =>
      context.watch(actor)
      context.become(active(actor))
      logger.info(s"Identifying actor: $path")
    case ActorIdentity(`path`, None) => 
      logger.info(s"Remote actor not available: $path")
    case ReceiveTimeout => 
      sendIdentifyRequest()
    case _ =>
      logger.info("Not ready yet")
  }

然而,当我发送识别信息(这是正确的路径)时,它没有获得一个ActorIdentity,它只是打印"尚未准备好"。

当我在本地运行服务器时,一切正常。所以我真的很困惑为什么服务器按预期工作。

0 个答案:

没有答案