diff --git a/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala index ca47f4f36e..7ef133d0fe 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/RoutingSpec.scala @@ -73,9 +73,9 @@ class RoutingSpec extends AkkaSpec with DefaultTimeout with ImplicitSender { def receive = { case RouterRoutees(iterable) ⇒ - iterable.exists(_ == "routee1") must be(true) - iterable.exists(_ == "routee2") must be(true) - iterable.exists(_ == "routee3") must be(false) + iterable.exists(_.path.name == "routee1") must be(true) + iterable.exists(_.path.name == "routee2") must be(true) + iterable.exists(_.path.name == "routee3") must be(false) doneLatch.countDown() case "doIt" ⇒ router ! CurrentRoutees diff --git a/akka-actor/src/main/scala/akka/routing/Routing.scala b/akka-actor/src/main/scala/akka/routing/Routing.scala index fd33eb1525..7f9394fdc5 100644 --- a/akka-actor/src/main/scala/akka/routing/Routing.scala +++ b/akka-actor/src/main/scala/akka/routing/Routing.scala @@ -30,7 +30,7 @@ private[akka] class RoutedActorRef(_system: ActorSystemImpl, _props: Props, _sup case _: AutoReceivedMessage ⇒ Nil case Terminated(_) ⇒ Nil case CurrentRoutees ⇒ - sender ! RouterRoutees(_routees map (_.path.name)) + sender ! RouterRoutees(_routees) Nil case _ ⇒ if (route.isDefinedAt(sender, message)) route(sender, message) @@ -149,14 +149,15 @@ case class Broadcast(message: Any) /** * Sending this message to a router will make it send back its currently used routees. - * The routees will be sent as a RouterRoutees message to the "requester". + * A RouterRoutees message is sent asynchronously to the "requester" containing information + * about what routees the router is routing over. */ case object CurrentRoutees /** * Message used to carry information about what routees the router is currently using. */ -case class RouterRoutees(routees: Iterable[String]) +case class RouterRoutees(routees: Iterable[ActorRef]) /** * For every message sent to a router, its route determines a set of destinations,