Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom Akka dispatcher in Play 2.2.x
    primarykey
    data
    text
    <p>I'm trying to configure custom Akka dispatchers in Play 2.2.x in the <code>application.conf</code> configuration file like this:</p> <pre><code>contexts.my-dispatcher { fork-join-executor { parallelism-max = 4 } } </code></pre> <p>In addition, I'm specifying either <code>withDispatcher</code> programmatically</p> <pre><code>Akka.system.actorOf(Props(classOf[MyActor], arg1, arg2) .withDispatcher("contexts.my-dispatcher"), name = "MyActor") </code></pre> <p>or, preferably, I would like to do it in the configuration directly</p> <pre><code>akka.actor.deployment { /MyActor { dispatcher = contexts.my-dispatcher } } </code></pre> <p>Both cases don't seem to work for me as in the log file (application.log; configured via logback; logging via ActorLogging) I see the <code>default-dispatcher-[X]</code> being used. Example:</p> <pre><code>2013-12-30 11:37:40,999 - [DEBUG] - from x.y.z.MyActor in application-akka.actor.default-dispatcher-7 Some message </code></pre> <p>When I'm specifying a wrong dispatcher name on purpose, I get the "Dispatcher [wrong-name] not configured, using default-dispatcher". Since I don't get this warning with the above configuration/code, I'm assuming that in general it should be ok. Can someone shed some light on what is going on here?</p> <p>The logback appender configuration (application-logger.xml) is:</p> <pre><code>&lt;appender name="FILE" class="ch.qos.logback.core.FileAppender"&gt; &lt;file&gt;${application.home}/logs/application.log&lt;/file&gt; &lt;encoder&gt; &lt;pattern&gt;%date - [%level] - from %logger in %thread %n%message%n%xException%n&lt;/pattern&gt; &lt;/encoder&gt; &lt;/appender&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload