title: In RxJava, how do I start a potentially infinite stream of events generated from an API?
body: <p>I have an API available to clients that can be simplified to this:</p>
  
  <pre><code>public class API {
    public void sendEvent(Event e);
  }
  </code></pre>
  
  <p><code>Event</code> instances enter my system whenever a client calls the API (technically over Binder into a <code>Service</code> derivative) which are then processed, filtered and dispatched to other internal components. I don't care about past events, just those available from the time a subscriber subscribes. It seems like a natural fit for the Rx paradigm which I'm just getting my feet wet with.</p>
  
  <p>I need an Observable that is created once, allows multiple subscribers, and can be fed instances of <code>Event</code> that are then sent through the reactive pipeline to observers. A <code>Subject</code> seems appropriate for what I'm looking to do (in particular, <a href="https://stackoverflow.com/a/14406666/562139">this answer</a> to <a href="https://stackoverflow.com/q/14396449/562139">this question</a> resonated with me).</p>
  
  <p>What do other RxJava users recommend?</p>