title: Akka messaging mechanisms by example
body: <p>I have a fair amount of Apache Camel (routing/mediation/orchestation engine; lightweight ESB) experience and am racking my brain trying to understand the difference between Akka:</p>
  
  <ul>
  <li>Dispatchers (<code>Dispatcher</code>, <code>PinnedDispatcher</code>, <code>CallingThreadDispatcher</code>)</li>
  <li>Routers</li>
  <li>Pools</li>
  <li>Groups</li>
  <li>Event Buses</li>
  </ul>
  
  <p>According to the docs:</p>
  
  <p><strong>Dispatchers</strong> are:</p>
  
  <blockquote>
    <p>...is what makes Akka Actors “tick”, it is the engine of the machine so to speak.</p>
  </blockquote>
  
  <p>But that doesn't really explain what a dispatcher is or what it's relationship to an actor is.</p>
  
  <p><strong>Routers</strong> are:</p>
  
  <blockquote>
    <p>Messages can be sent via a router to efficiently route them to destination actors, known as its routees. A Router can be used inside or outside of an actor, and you can manage the routees yourselves or use a self contained router actor with configuration capabilities. But it sounds an awful lot like a dispatcher.</p>
  </blockquote>
  
  <p><strong>Pools</strong> are:</p>
  
  <blockquote>
    <p>[A type of] router [that] creates routees as child actors and removes them from the router if they terminate.</p>
  </blockquote>
  
  <p><strong>Groups</strong> are:</p>
  
  <blockquote>
    <p>[A type of] actor [where routees] are created externally to the router and the router sends messages to the specified path using actor selection, without watching for termination.</p>
  </blockquote>
  
  <p><strong>Event Buses</strong> are:</p>
  
  <blockquote>
    <p>...a way to send messages to groups of actors</p>
  </blockquote>
  
  <p>This sounds just like dispatchers and routers.</p>
  
  <p>So my main concerns are:</p>
  
  <ul>
  <li>What is the difference between dispatchers, routers and event buses, and when to use each?</li>
  <li>When to use pool vs group?</li>
  </ul>