title: Storm Topology Builder with Akka Actors
body: <p>Following code, builds a topology starting with a spout. In this, <code>TenderEventSpout2</code> is an Akka Actor.   </p>
  
  <pre><code>TopologyBuilder builder = new TopologyBuilder();
  builder.setSpout("EventSpout", new TenderEventSpout2(), 1);
  </code></pre>
  
  <p>TenderEventSpout2 looks like this:</p>
  
  <pre><code>public class TenderEventSpout2 extends UntypedActor implements IRichSpout{  
  
      @Override 
      public void onReceive(Object message){// throws IOException {}
  
      @Override
      public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {}
  
      @Override
      public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector spoutOutputCollector) {}
  
      @Override
      public void nextTuple() {}
  
  
      //Override all the interface methods
      @Override
      public void close() {}
  
      public boolean isDistributed() {
          return false;
      }
  
      @Override
      public void activate() {}
  
      @Override 
      public void deactivate() {}
  
      @Override
      public void ack(Object msgId) {}
  
      @Override
      public void fail(Object msgId) {}
  
      @Override
      public Map&lt;String, Object&gt; getComponentConfiguration() {
          return null;
      }
  
  }
  </code></pre>
  
  <p>This compiles successfully, but I get this error:</p>
  
  <blockquote>
    <p>You cannot create an instance of [org.quadrisk.toplogy.TenderEventSpout2] explicitly using the constructor (new). You have to use one of the 'actorOf' factory methods to create a new actor. See the documentation.</p>
  </blockquote>
  
  <p>But creating an actor using actorOf as suggested would return me an object of ActorRef type. How do I go about this. Thanks in advance.</p>