title: Error Configuring Akka Router
body: <p>Given the following 2 Actors, <code>Downloader</code> and <code>DownloadActor</code>, the latter actor has a <code>router</code>, named <code>Router</code>.</p>
  
  <p>However, when I run <code>sbt run</code>, I get the following run-time exception:</p>
  
  <blockquote>
    <p>Caused by: akka.ConfigurationException: Configuration missing for
    router [akka://Downloader/user/DownloadActor/Router] in
    'akka.actor.deployment' section.</p>
  </blockquote>
  
  <p>Here's my code:</p>
  
  <p><strong>Downloader.scala</strong></p>
  
  <pre><code>object DownloadMain {
  
      val system = ActorSystem("Downloader")
  
      val actor = system.actorOf(Props[DownloadActor], "DownloadActor")
  
      def main(args: Array[String]) {
          actor ! new URL("http://www.cis.upenn.edu/~matuszek/index.html")
      }
  }
  </code></pre>
  
  <p><strong>DownloadActor.scala</strong></p>
  
  <pre><code>class DownloadActor extends Actor with ActorLogging {
  
      val router = context.actorOf( Props[Worker].withRouter( FromConfig()), "Router")
      ...
  </code></pre>
  
  <p><strong>application.conf</strong></p>
  
  <pre><code>akka.actor.deployment {
      /Downloader/DownloadActor/Router {
          router = "round-robin" 
          nr-of-instances = 8
      }
  }
  </code></pre>
  
  <p>Please let me know which configuration error that I'm making.</p>
  
  <p>I saw this <a href="https://stackoverflow.com/questions/14302929/configurate-nested-router-in-akka">post</a>, but the solution doesn't seem exact (at least to me).</p>