If I had a RoundRobinPool like this
val actorPoolRef = AkkaConfig.actorSystem.actorOf(RoundRobinPool(100).props(Props[MyService]))
and a handler
def requestHandler(request: HttpRequest): Future[HttpResponse] = {
val promise = Promise[HttpResponse]()
promise.completeWith(actorPoolRef ? request)
promise.future
}
Is there any way I can
- get the exact actor reference from the scope of
def requestHandler, or - send a follow-up message to the same actor that just handled the request