No ActorIdentity response for non-existing wildcard based ActorSelection
Using Akka 2.3.2:
Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import ActorDSL._
import ActorDSL._
scala> implicit val system = ActorSystem("repl")
system: akka.actor.ActorSystem = akka://repl
scala> implicit val in = inbox()
in: akka.actor.ActorDSL.Inbox = akka.actor.dsl.Inbox$Inbox@30e049af
scala> system.actorSelection("/user/non-existing") ! Identify(0)
scala> in.receive()
res1: Any = ActorIdentity(0,None)
scala> system.actorSelection("/user/non-*") ! Identify(0)
scala> in.receive()
java.util.concurrent.TimeoutException: deadline passed
at akka.actor.dsl.Inbox$InboxActor$$anonfun$receive$1.applyOrElse(Inbox.scala:117)
at scala.PartialFunction$AndThen.applyOrElse(PartialFunction.scala:184)
at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
at akka.actor.dsl.Inbox$InboxActor.aroundReceive(Inbox.scala:62)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Leave a comment
on 2014-04-10 10:41 *
By Heiko Seeberger
Description changed from Welcome to Scala version 2.... to Using Akka 2.3.2:
on 2014-04-10 11:55 *
By Patrik Nordwall
This is by design for wildcard selections and I think it would be very difficult to implement it.
When should it reply with ActorIdentity(None)? The wildcard can potentially traverse remote nodes.
The documentation should be improved if this is not described behavior.
When should it reply with ActorIdentity(None)? The wildcard can potentially traverse remote nodes.
The documentation should be improved if this is not described behavior.