title: How to cache items from hot observable into cold observable right after subscription
body: <p>I have one global hot observable, which producing values independently. I have transformed global observable to derived hot. I need to create cold observable, which will replay all items from derived hot observable with keeping derived hot observable as <strong>hot</strong> without replay.</p>
  <pre><code>ConsoleOutput output = new();
  ConsoleKey? pressedKey = null;
  IDisposable? coldSourceSubscription = null;
  
  var globalHotSource = Observable.Interval(TimeSpan.FromSeconds(1)).Publish().AutoConnect();
  var derivedHotSource = globalHotSource.DelaySubscription(TimeSpan.FromSeconds(4));
  var derivedColdSource = derivedHotSource; // How to make it cold?
  
  globalHotSource.Subscribe(x =&gt; output.AddToLine(0, x, &quot;Initial HOT:&quot;));
  derivedHotSource.Subscribe(x =&gt; output.AddToLine(1, x, &quot;Derived HOT:&quot;));
  
  while ((pressedKey = Console.ReadKey().Key) != ConsoleKey.Escape || coldSourceSubscription is null)
  {
      if (pressedKey != ConsoleKey.Enter) continue;
      coldSourceSubscription = derivedColdSource.Subscribe(x =&gt; output.AddToLine(2, x, &quot;Derived COLD:&quot;));
  }
  
  Console.ReadLine();
  </code></pre>
  <p><code>ConsoleOutput</code> is a helper class and here is the code for it:</p>
  <pre class="lang-cs prettyprint-override"><code>class ConsoleOutput
  {
      readonly List&lt;List&lt;string&gt;&gt; _lines = new(Enumerable.Repeat&lt;List&lt;string&gt;&gt;(null, 128));
      public ConsoleOutput()
      {
          Observable.Interval(TimeSpan.FromMilliseconds(500))
              .ObserveOn(TaskPoolScheduler.Default)
              .Subscribe(_ =&gt; Refresh());
      }
  
      public void AddToLine(int lineNumber, object item, string initialItemFormat)
      {
          (_lines[lineNumber] ??= new List&lt;string&gt;() { string.Format(initialItemFormat, lineNumber) }).Add(item.ToString());
      }
  
      private void Refresh()
      {
          var output = _lines.Where(x =&gt; x is { })
              .Select(x =&gt; x.Aggregate(string.Empty, (x, y) =&gt; x + &quot; &quot; + y))
              .DefaultIfEmpty()
              .Aggregate((x, y) =&gt; x + &quot;\n&quot; + y);
  
          Console.Clear();
          Console.WriteLine(output);
      }
  }
  </code></pre>
  <p>And here is the sample output from console:</p>
  <pre><code> Initial HOT: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
   Derived HOT: 4 5 6 7 8 9 10 11 12 13 14
   Derived COLD: 7 8 9 10 11 12 13 14
  </code></pre>
  <p>First the code will produce items on the first line for global observable, after 4 seconds the derived one will produce it's items on the second line and the last one will be cold (which is not cold at the moment) which will produce values after user presses 'Enter' in console. I need for cold observable to show the same values, as the derived one.</p>
  <p>The easiest way I could think of to solve it is to use <code>ReplaySubject</code> and insert <code>.Do(x =&gt; replaySubject.OnNext(x))</code> to derived observable and then assign replaySubject as observable to the target cold observable. However, is it possible to achieve the same without using subject?</p>