2014-04-08 29 views
2

當我使用通配符呼叫actorSelection,並且沒有匹配的演員時,我希望得到ActorIdentity(None,None)作爲響應,但事實並非如此。這是正常情況還是我在這裏錯過了一些東西?使用通配符時,actorSelection不響應

class A extends Actor { 
    val b = context.actorOf(Props[B], "test") 
    def receive = { case x => println(s"Response: $x") } 

    context.actorSelection("/user/a/test") ! Identify(None) 
    // Response: ActorIdentity(None,Some(Actor[akka://sys/user/a/test#121958964])) 

    context.actorSelection("/user/a/nothing") ! Identify(None) 
    // Response: ActorIdentity(None,None) 

    context.actorSelection("/user/a/x*") ! Identify(None) 
    // Nothing happens 
} 
+0

我想它和它的作品。你的測試代碼有可能是錯的嗎?你看到死信了嗎? – Christian

+0

@Christian,不,我沒有在控制檯輸出中看到他們。你使用什麼版本的阿卡?我的是2.2.3 – Anton

+0

我再次測試。我有同樣的行爲。我在akka郵件列表上發佈了一個問題:https://groups.google.com/forum/#!topic/akka-user/qnp_DHpnKIQ我也在使用2.2.3。 – Christian

回答