2013-04-20 17 views
5

sto usando Giocare 2.1.1 e in application.conf ho aggiungere il seguente dispatcher personalizzato:Giocare 2.1.1 non Loading Akka dispatcher

# Dispatcher for round-robin actors 
play { 
    akka { 
     actor { 
      rr-dispatcher = { 
       type = BalancingDispatcher 
       executor = fork-join-executor 
       fork-join-executor { 
        parallelism-min = 2 
        parallelism-factor = 2 
        parallelism-max = 24 
       } 
       # messages per actor before jumping 
       throughput = 100 
      } 
     } 
    } 
} 

cerco di usarlo su un attore:

private val default = Akka.system.actorOf(Props[MessageRouterActor].withRouter(FromConfig()).withDispatcher("rr-dispatcher"), "msgRouter") 

Ma ottengo questo messaggio che indica il dispatcher non è stato trovato:

[info] play - Starting application default Akka system. 
[WARN] [04/20/2013 22:05:12.069] [application-akka.actor.default-dispatcher-5] [Dispatchers] Dispatcher [rr-dispatcher] not configured, using default-dispatcher 

Per quanto ho visto thi s sembra essere il modo corretto per aggiungerlo. Qualcuno sa qual è il problema?

risposta

7

devi mettere il percorso completo del valore di configurazione: withDispatcher ("akka.actor.rr-dispatcher") (o forse anche "play.akka.actor.rr-dispatcher")

+0

che è stato, grazie :) –

+0

Questo mi ha salvato moltissimo tempo, grazie! – Jaap