Scala 服务器上的Akka Actor未返回对标识消息的ActorIdentity响应

Scala 服务器上的Akka Actor未返回对标识消息的ActorIdentity响应,scala,akka,actor,remote-actors,akka-remote-actor,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 ActorIdentit

我有这段代码

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,它只是打印尚未就绪


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

为什么要将correlationId称为路径?另外,为什么要在backticks中引用它呢?将您的case=>更改为case other=>,然后在日志消息中打印other,以查看match语句中的内容。我同意上面的评论,即反勾号可能是导致问题的原因。在scala中,反勾号用于命名代码。我认为您的倒勾路径被解释为参与者的路径函数,因此您的代码与之匹配。