--
>>>>>>>>>> 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.
Patrik Nordwall
Typesafe - Reactive apps on the JVM
Twitter: @patriknw
So my req is that which ever message went to a routee of TestConnActor they should all be consolidated as list in the Aggregator actor.
So if message 1 and 2 made it to TestConnActor routee1 and message 3 and 4 made it to TestConnActor routee2 then when the messages 1 and 2 should reach the same routee of the Aggregator actor. Please suggest me if its doable with CHR.
TestHashMapper just uses one of the incoming message's id and returns that as hash key.
TestHashMapper hashMapper =
new TestHashMapper();
actorSystem().actorOf(Props.create(TestConnActor.
class).withRouter(new ConsistentHashingRouter( new Integer(3)).withHashMapper(hashMapper)), "TestQuant" );actorSystem().actorOf(Props.create(TestEventAggregator.
class).withRouter(new ConsistentHashingRouter( new Integer(3)).withHashMapper(hashMapper)), "TestAgg" );actorSystem().actorOf(Props.create(TestBulkActor.
class).withRouter(new ConsistentHashingRouter( new Integer(3)).withHashMapper(hashMapper)), "TestBulk" );ActorRef single = actorSystem().actorOf(
new RoundRobinPool(3).props(Props.create(TestSingleActor.class)), "TestSingle");
~
I am using akka 2.3.0 and this is how i am creating the CHR.So my req is that which ever message went to a routee of TestConnActor they should all be consolidated as list in the Aggregator actor.
So if message 1 and 2 made it to TestConnActor routee1 and message 3 and 4 made it to TestConnActor routee2 then when the messages 1 and 2 should reach the same routee of the Aggregator actor. Please suggest me if its doable with CHR.
TestHashMapper hashMapper =
new TestHashMapper();actorSystem().actorOf(Props.create(TestAdaptorActor.
class).withRouter(new ConsistentHashingPool( new Integer(3)).withHashMapper(hashMapper)), "TestQuant" );TestHashMapper hashMapper1 =
new TestHashMapper();actorSystem().actorOf(Props.create(TestEventAggregator.
class).withRouter(new ConsistentHashingPool( new Integer(3)).withHashMapper(hashMapper1)), "TestAgg" );TestHashMapper hashMapper2 =
new TestHashMapper();actorSystem().actorOf(Props.create(TestBulkActor.
class).withRouter(new ConsistentHashingPool( new Integer(3)).withHashMapper(hashMapper2)), "TestBulk" );ActorRef single = actorSystem().actorOf(
new RoundRobinPool(3).props(Props.create(TestSingleActor.class)), "TestSingle"); for(int i =1; i<=12;i++){
single.tell(Integer.valueOf(i) , single);
}
Thanks for your suggestion. So if i have two different actors with CHR and there is no guarantee that the messages will be routed to same routee within the CHR's. If thats the case then i got to change my approach. Consistent hasing routing will work only for the same type of actors is it? Please let me know.