title: Recursive / fan-out in Reactive Extensions
body: <p>I'm attempting to piece together a Rx pipeline that works as follows:</p>
  
  <ol>
  <li>I have written a function that takes in an IObservable providing me with profiles containing information about a company</li>
  <li>I query a variety of data sources to find potentially related company profiles, all in parallel. I merge that into a single IObservable of company profiles.</li>
  <li>When I get back these potentially related profiles, I compare them to profiles that I have already observed and, if they have a relevance > 80% and are not the same as any profiles I've already observed, I consider them a match.</li>
  <li>I want to feed the matching companies back into step 1 so that I can search for related data to these new matching profiles.</li>
  </ol>
  
  <p>I bootstrap the process with some known good profiles.</p>
  
  <p>Eventually, there's no more matching profiles that haven't already been seen, and so the process ends.</p>
  
  <p>I'm having trouble programming this. If I use a Subject to allow the tail end of the pipeline to send its profiles to the beginning of the workflow, then no one is going to call OnCompleted and I never find out that the process has ended. If I develop this with recursion instead, I seem to always end up with a stack overflow since I'm trying to call a function with its own return value.</p>
  
  <p>Can anyone help me with how I can accomplish this task in a way where I can determine that the process has ended?</p>