Hi Raphael.

currently an asterisk matches only one level of actors. So you will have to
have some repetition to express your current setup:

my-router {
  router = balancing-pool
  nr-of-instances = 50
}

akka.actor.deployment {
  "/*/*/*/querierRouter" = ${my-router}
  "/*/*/*/*/querierRouter" = ${my-router}
  "/*/*/*/*/*/querierRouter" = ${my-router}
}

If I understood correctly this is only to make development easier. After
your actor paths get more stable then you can only leave the required
configuration.

I also did some archaeology and found a thread related to the issue you are
hitting. A closed ticket
<https://www.assembla.com/spaces/akka/tickets/2003#/activity/ticket:> in
Akka old issue tracker argues that it is hard to implement such a feature
because it would require searching all deployment configuration on every
actor creation.


On Tue, Sep 2, 2014 at 4:18 AM, Raphael do Vale <[email protected]>
wrote:

> I am studying the Akka framework (Java) and building a crawler (which,
> hopefully, will be open source in the coming months...). I've create some
> low-level actors which will be responsible to effectively crawl over data
> sources and return the found data as a message. This actors are running
> inside an akka router as I currently can’t make non-blocking calls over my
> data sources (this solution is suggested in akka documentation). One of the
> cool features of the framework is that I can simply configure how the
> routers works in configuration files, which makes easier to change my
> system’s behavior. I.e.:
>
> akka.actor.deployment {
>>   /"*"/querierRouter {
>>     router = balancing-pool
>>     nr-of-instances = 50
>>   }
>>
>>
> This configuration worked fine in my simpler unit test. The akka system
> was capable to identify the configuration and associated it to the desired
> router. However, as my application increased in complexity, different paths
> from different sizes were created and both of them reach to this router.
> Currently, I’ve paths like this (simplified version):
>
> akka://CRAWLER/user/$a/$a/RESOURCE_PROCESSOR/$a/QUERY/querierRouter
>
>
> Which the Akka system is unable to find the correct configuration, sending
> the following message:
>
>
>> akka.ConfigurationException: Configuration missing for router 
>> [akka://CRAWLER/user/$a/$a/RESOURCE_PROCESSOR/$a/QUERY/querierRouter]
>> in 'akka.actor.deployment' section.
>
>
>
> I have searched the documentation but did not found any information about
> a solution for this. So, my question is: how can I specify a configuration
> that is valid for ANY path that ends with “querierRouter”? In my mind, this
> is mandatory to make it viable (as the path can vary dynamically). Or did I
> miss something? I have to isolate my blocking threads into a router to
> avoid blocks inside my actor system but I do not know how to configure this
> router in a situation which many kinds of actors could ask for data.
>
> Thanks in advance.
>
>
>
> --
> >>>>>>>>>> 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.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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.

Reply via email to