I’m creating a router using the router configuration in application.conf.
In a situation I need to manually remove the routes and add routes to my router. I saw in akka-scala document (link), using removeRoutee and andRoutee we will be able to achieve it.
But since I’m creating the router using configuration I can select the router using the following code.
var router = Akka.system().actorSelection("/user/intelliSupervisor/router")
var routerFut = router.resolveOne()(10)
routerFut.onComplete {
case Success(actor) => {
// 'actor' RoutedActorRef
}
case Failure(ex) =>
}
In the future onComplete Success call it's returning akka.routing.RoutedActorRef. How can I access the created akka.routing.Router ? or is there anyway I can covert it to a router object ?
Thank you very much in advance.