Question

When I call actorSelection with wildcard and there's no matching actors I expect to get ActorIdentity(None,None) in response but instead nothing happens. Is it normal situation or am I missing something here?

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
}
Was it helpful?

Solution

Looks like this is a bug.

See: https://www.assembla.com/spaces/akka/tickets/3992

Update: Looks like this is by design (see ticket comments) and no bug after all...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top