title: RxJava share an Observable's emissions between multiple subscribers
body: <p>I have the following problem:</p>
  
  <p>I have a observable that is doing some work, but other observables need the output of that observable to work. I have tried to subscribe several times on the same observable, but inside the log i see that the original observable is initiated multiple times. </p>
  
  <p>thats my observable thats create the object:</p>
  
  <pre><code>Observable.create((Observable.OnSubscribe&lt;Api&gt;) subscriber -&gt; {
              if (mApi == null) {
                  //do some work
              }
              subscriber.onNext(mApi);
              subscriber.unsubscribe();
          })
  </code></pre>
  
  <p>thats my observable that needs the object</p>
  
  <pre><code>loadApi().flatMap(api -&gt; api....()));
  </code></pre>
  
  <p>I'm using </p>
  
  <pre><code>.subscribeOn(Schedulers.io()) observable.observeOn(AndroidSchedulers.mainThread())
                  .unsubscribeOn(Schedulers.io()
  </code></pre>
  
  <p>on all observables.</p>