If you use a router Group you can send akka.routing.AddRoutee or akka.routing.RemoveRoutee message to the router.
If you use a router Pool you can send akka.routing.AdjustPoolSize (or AddRoutee or RemoveRoutee) message to the router. See documentation: http://doc.akka.io/docs/akka/2.3.9/scala/routing.html#Managagement_Messages If need full control of the lifecycle of the routees you can use RoutingLogic inside an ordinary actor instead. See documentation: http://doc.akka.io/docs/akka/2.3.9/scala/routing.html#A_Simple_Router Regards, Patrik On Wed, Feb 11, 2015 at 5:44 AM, Renien Joseph <[email protected]> wrote: > Hello All, > > 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 > <http://doc.akka.io/api/akka/2.3.2/index.html#akka.routing.Router>), > 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. > > > Regards, > > Renien Joseph > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw [image: Scala Days] <http://event.scaladays.org/scaladays-sanfran-2015> -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
