Hi, I'm trying to configure a simple Akka cluster-aware router group, using 
2 nodes ("receiver" and "processor" roles).
Everything configured in code.

on RECEIVER node:

List<String> path = singletonList("/user/processorRouter");
processorRouter = context().actorOf(
       new ClusterRouterGroup(new RoundRobinGroup(path), 
             new ClusterRouterGroupSettings(10, path, false, 
"processor")).props(), "clusterProcessorRouter");

on PROCESSOR node:

ActorRef processorRouter = system.actorOf(
      SpringProps.create(system, ProcessorActor.class).withRouter(
              new RoundRobinPool(10)), "processorRouter");

(I'm using Spring Extension to create actors, but I believe that does not 
matter in this case)

The problem is, when I send a message from Receiver node actors:

processorRouter.tell(data, self());

Akka delivers this messages only SOMETIMES. Here what I can see in logs:

receiver_1: Receiver sent a message to processor: TEST
receiver_1: Receiver sent a message to processor: TEST
receiver_1: Receiver sent a message to processor: TEST
receiver_1: Receiver sent a message to processor: TEST
receiver_1: Receiver sent a message to processor: TEST
processor_1: Processor got a message: TEST
receiver_1: Receiver sent a message to processor: TEST
receiver_1: Receiver sent a message to processor: TEST...


But when I send a message directly to that router from the "receiver" node, 
ALL messages are delivered successfully to the "processor":

system.actorFor(
       "akka.tcp://robot-system@172.18.0.4:2552/user/processorRouter")
             .tell(data, ActorRef.noSender());


Can't find the problem with cluster-aware router config. Please help!

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to