Hi,
I'm having trouble making consistent-hashing-pool work. I'm using Akka with
under Play and inject Akka Actors with Guice. Everything looks fine but
according to logs my tasks are executed by default dispatcher. I expect
them to be run by hashing-pool. Could you please check my configuration and
tell me if I'm missing something?
My application.conf
akka {
actor {
deployment {
...
/campaign-activity-router {
router = consistent-hashing-pool
nr-of-instances = 10
virtual-nodes-factor = 10
}
}
My module
public class AdsModule extends AbstractModule implements AkkaGuiceSupport {
public void configure() {
bindActor(CampaignActivityActor.class, "campaign-activity-router",
this::applyActorProps);
}
private Props applyActorProps(final Props props) {
return
props.withRouter(FromConfig.getInstance().withSupervisorStrategy(newAlwaysRestartOnlyActorSupervisorStrategy()));
}
private SupervisorStrategy
newAlwaysRestartOnlyActorSupervisorStrategy() {
return new OneForOneStrategy(-1, Duration.Inf(), throwable ->
SupervisorStrategy.restart(), true);
}
}
My message class
public class Message implements ConsistentHashingRouter.ConsistentHashable,
Serializable {
private final Subscriber subscriber;
public Object consistentHashKey() {
return subscriber.getId();
}
}
Caller code
@Inject
@Named("campaign-activity-router")
private ActorRef campaignActivityActorRouter;
this.campaignActivityActorRouter.tell...
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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.