Isn't it typically that you just want to configure one or a few things of your router, like the pool size? Then you can read that from a separate config property.
Another solution that might work is to use wildcards in the the deployement config path. It is still a bit fragile in respect to implementation details, since you have to know at what level in the actor tree they are created. Regards, Patrik On Fri, Sep 11, 2015 at 2:41 AM, MarekK <[email protected]> wrote: > I was actually hoping to have it all in cfg (including the round-robin > part, I don't know how would I extract it so that whole router > configuration is loaded from custom cfg section), so it is consistent with > way other actors are deployed in system. Doing it as you described is what > I wanted to avoid - but if there is no better way, then I don't have a > choice. Sorry for not formulating my question better. > > So basically whenever we use akka-streams and have a actorSubscriber, I > can no longer control his deployment and deployment of his children via > same configuration properties as I do with other actors ? > I know I can also put children level above the subscriber and send > reference to the subscriber if I really need it in cfg, but I was hoping > for a better way. This just doesn't feel right for me. > > Thanks for your assistance. > > On Thursday, 10 September 2015 21:01:50 UTC+12, Akka Team wrote: >> >> Hi Marek, >> >> >> >> >> On Thu, Sep 10, 2015 at 3:34 AM, Marek Kadek <[email protected]> wrote: >> >>> Hi, >>> >>> thanks for answer. Sorry, I'm not sure I understand you - I'm still >>> stuck those - could you give me an example how to deploy my worker as >>> router, let's say as RoundRobinPool of 5 instances ? How would I specify it >>> in Deploy ? If I use Deploy(routerConfig = FromConfig) I still have the >>> relative address problem... example would be greatly appreciated. >>> >> >> yourProps.withDeploy(Deploy(routerConfig = RoundRobinPool(5))) >> >> or >> >> yourProps.withRouter(RoundRobinPool(5)) >> >> If you use FromConfig then it will try to read it from configuration >> which is exactly what you want to avoid here. >> >> >>> >>> Or are you saying that I should just create deploy manually, and >>> arguments I put inside, put to some custom section in my own config ? >>> >> >> Yes, exactly. That way the deployment information is not tied to a path >> but the link is made explicitly in the code. >> >> -Endre >> >> >>> >>> On Wednesday, 9 September 2015 21:01:02 UTC+12, Akka Team wrote: >>>> >>>> Hi Marek, >>>> >>>> In this case it is better to not rely on the name of the actor since it >>>> might depend on several things. Instead, you can specify a Deploy object on >>>> your Props directly (programmatically). See the docs for Deploy here: >>>> http://doc.akka.io/api/akka/2.3.13/#akka.actor.Deploy >>>> >>>> Then you can use myProps.withDeploy(myDeploy) to install it on the >>>> Props itself. Unfortunately the code that parses a Deploy object from >>>> config is internal, otherwise you would be able to simply add a custom >>>> configuration section in your config for this deployment and parse it >>>> directly from there. >>>> >>>> -Endre >>>> >>>> On Sun, Sep 6, 2015 at 10:25 PM, Marek Kadek <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I would like to do pretty much something like this: >>>>> >>>>> http://doc.akka.io/docs/akka-stream-and-http-experimental/current/scala/stream-integrations.html#actorsubscriber >>>>> >>>>> that there is a ActorSubscriber, which has some children... I would >>>>> like to control deyploment of the children via external configuraiton (one >>>>> example could be a pool of workers...). >>>>> >>>>> akka.actor.deployment { >>>>> /?actor-sink-materialzied-name?/worker { >>>>> ... some cfg >>>>> } >>>>> } >>>>> >>>>> But since I do not know what will be the materialized name be, how >>>>> would one go about this ? >>>>> >>>>> Thanks >>>>> >>>>> >>>>> -- >>>>> >>>>>>>>>> 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. >>>>> >>>> >>>> >>>> >>>> -- >>>> Akka Team >>>> Typesafe - Reactive apps on the JVM >>>> Blog: letitcrash.com >>>> Twitter: @akkateam >>>> >>> -- >>> >>>>>>>>>> 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. >>> >> >> >> >> -- >> Akka Team >> Typesafe - Reactive apps on the JVM >> Blog: letitcrash.com >> Twitter: @akkateam >> > -- > >>>>>>>>>> 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 -- >>>>>>>>>> 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.
