title: Single Observable with Multiple Subscribers
body: <p>I have an <code>Observable&lt;&lt;List&lt;Foo&gt;&gt; getFoo()</code> that is created from a Retrofit Service and after calling the
  <code>.getFoo()</code> method, I need to share it with Multiple Subscribers. Calling the <code>.share()</code> method though, it causes the Network Call to be re-executed. Replay Operator does not work either. I know that a potential solution might be <code>.cache()</code>, but I do not know why this behaviour is caused.</p>
  
  <pre><code>// Create an instance of our GitHub API interface.
  Retrofit retrofit = new Retrofit.Builder()
              .baseUrl(API_URL)
              .addConverterFactory(GsonConverterFactory.create())
              .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
              .build();
  
  // Create a call instance for looking up Retrofit contributors.
  Observable&lt;List&lt;Contributor&gt;&gt; testObservable = retrofit
          .create(GitHub.class)
          .contributors("square", "retrofit")
          .share();
  
  Subscription subscription1 = testObservable
         .subscribe(new Subscriber&lt;List&lt;Contributor&gt;&gt;() {
              @Override
              public void onCompleted() {
  
              }
  
              @Override
              public void onError(Throwable throwable) {
  
              }
  
              @Override
              public void onNext(List&lt;Contributor&gt; contributors) {
                  System.out.println(contributors);
              }
           });
  
  Subscription subscription2 = testObservable
          .subscribe(new Subscriber&lt;List&lt;Contributor&gt;&gt;() {
              @Override
              public void onCompleted() {
  
              }
  
              @Override
              public void onError(Throwable throwable) {
  
              }
  
              @Override
              public void onNext(List&lt;Contributor&gt; contributors) {
                  System.out.println(contributors + " -&gt; 2");
              }
           });
  
  subscription1.unsubscribe();
  subscription2.unsubscribe();
  </code></pre>
  
  <p>The code above can reproduce the aforementioned behaviour. You can debug it and see that the Lists received belong to a different MemoryAddress.</p>
  
  <p>I have also looked at ConnectableObservables as a potential solution, but this requires me carrying the original observable around, and calling <code>.connect()</code> each time I want to add a new Subscriber.</p>
  
  <p>This kind of behaviour with the <code>.share()</code> was working fine till Retrofit 1.9. It stopped working on Retrofit 2 - beta. I have not yet tested it with the Retrofit 2 Release Version, that was released some hours ago.</p>
  
  <p>EDIT: 01/02/2017</p>
  
  <p>For future readers, I have written an article <a href="https://medium.com/@p.tournaris/rxjava-one-observable-multiple-subscribers-7bf497646675#.rjwhxkjhp" rel="noreferrer">here</a> explaining more about the case!</p>