Yes, we chose it to be non transparent to use routers or not since it
fundamentally changes semantics.

-- 
Cheers,
√
On 28 Jan 2015 16:09, "Cosmin Marginean" <cosmin...@gmail.com> wrote:

> Right, I got it now.
> So that needs to be explicit about using a router in the code using the
> actor. So this is not entirely enough on its own
>
> /myactor {
>   ...
>   router = round-robin-pool
>
>
> Thanks, at least I know that now.
>
> Cos
>
> On Wednesday, 28 January 2015 14:27:10 UTC, √ wrote:
>>
>> Hi all,
>>
>> if you want a router, then you need to create a router:
>>
>>
>>    1. ActorRef actorRef =
>>    2. actorSystem.actorOf(FromConfig.getInstance().props(Props.create(
>>    MyActor.class)),
>>    3. "myActor");
>>
>>
>> On Wed, Jan 28, 2015 at 3:24 PM, Björn Antonsson <bjorn.a...@typesafe.com
>> > wrote:
>>
>>> Hi Cos,
>>>
>>> Your single actor will process one single message at a time, in
>>> sequence. That is a fundamental principle of actors.
>>>
>>> If you want to have things happening in parallel then you need to have
>>> mutliple actors.
>>>
>>> B/
>>>
>>> On 28 January 2015 at 15:21:14, Cosmin Marginean (cosm...@gmail.com)
>>> wrote:
>>>
>>> We're running Akka 2.3.7 (Java) and I'm now working on reconfiguring to
>>> scale for more throughput (as it apparently isn't happening).
>>>
>>> I am struggling with the Akka documentation as well as some of the
>>> examples out there as there is always some contextual information that
>>> seems to be missing.
>>> However, in order to make sure I'm not going mad, I've extracted the
>>> code and config in a dead-simple unit test (I even removed akka's
>>> JavaTestKit).
>>>
>>> The code and config here suggest that there should be a lot of messages
>>> processed in parallel, however the entire processing is totally serialised
>>> and I can't understand where have I failed in this setup.
>>>
>>> Any suggestion would be helpful.
>>>
>>> Thank you
>>> Cos
>>>
>>>  @Test
>>> public void testAkka() throws Exception {
>>>     Config cfg = ConfigFactory.load("test-akka.conf");
>>>     ActorSystem actorSystem = ActorSystem.create("main", 
>>> cfg.getConfig("main"));
>>>     ActorRef actorRef = actorSystem.actorOf(Props.create(MyActor.class), 
>>> "myactor");
>>>     for (int i = 0; i < 150; i++) {
>>>         actorRef.tell("nothing", ActorRef.noSender());
>>>     }
>>>     Thread.sleep(1000000);
>>> }
>>>
>>> public static final class MyActor extends UntypedActor {
>>>     @Override
>>>     public void onReceive(Object message) throws Exception {
>>>         System.out.println("Doing stuff");
>>>         Thread.sleep(2000);
>>>     }
>>>
>>> }
>>>
>>>
>>> And the test-akka.conf file
>>>
>>>  main {
>>>   app-dispatcher {
>>>     type = Dispatcher
>>>     executor = "fork-join-executor"
>>>     fork-join-executor {
>>>       parallelism-min = 16
>>>       parallelism-factor = 32.0
>>>       parallelism-max = 512
>>>     }
>>>     throughput = 1
>>>   }
>>>
>>>   akka.actor.deployment {
>>>     /myactor {
>>>       dispatcher = app-dispatcher
>>>       router = round-robin-pool
>>>       nr-of-instances = 16
>>>     }
>>>   }
>>> }
>>>
>>>  --
>>> >>>>>>>>>> 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 akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> Björn Antonsson
>>> Typesafe <http://typesafe.com/> – Reactive Apps on the JVM
>>> twitter: @bantonsson <http://twitter.com/#!/bantonsson>
>>>
>>>  --
>>> >>>>>>>>>> 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 akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Cheers,
>> √
>>
>  --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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