title: Ignore Exception in Observable and Continue
body: <p>Consider this Observable:</p>
  
  <pre><code>_listener = Observable.Defer(() =&gt; _deviceTypeProvider.GetDeviceTypes().ToObservable()
              .SelectMany(CreateUdpListener, CreateMessage)
              .OfType&lt;DeviceMessage&gt;()
              .SelectMany(InjectTestMode)
              .OfType&lt;DeviceMessage&gt;()
              .Do(async message =&gt; await PublishMessage(message)))
              .Retry()
              .Subscribe(OnMessageReceive, OnError, OnComplete);
  </code></pre>
  
  <p>This works fine except when there is an exception thrown in either <code>CreateMessage</code> or <code>InjectTestMode</code>. </p>
  
  <p>I'd like the Observable to skip the item in the sequence which generated the exception and carry on.</p>
  
  <p>I've read about Catch but the example I found allow you to start a new Observable and I would like to carry on with the one I have.
  At the moment the entire sequence restarts which includes the UDP ports which I'd like to avoid if possible.</p>
  
  <p><strong>[Update]</strong></p>
  
  <p>A colleague and I re-read some of the comments about using <code>IEnumerable&lt;IObservable&lt;&gt;&gt;</code> or <code>IObservable&lt;IObservable&lt;&gt;&gt;</code> and came up with this which works! But is it right/best practice? </p>
  
  <p>In the event of an exception in the inner observable I'm wondering if it will only drop the packets from the <code>ReceiveAsync</code> event that was in flight.</p>
  
  <pre><code>var listeners = Observable.Defer(() =&gt; _deviceTypeProvider.GetDeviceTypes()
                  .ToObservable()
                  .Select(UdpListener)
                  .SelectMany(listener =&gt;
                  {
                    return Observable.Defer(() =&gt; Observable
                      .FromAsync(listener.UdpClient.ReceiveAsync)
                      .Where(x =&gt; x.Buffer.Length &gt; 0)
                      .Repeat()
                      .Select(result =&gt; CreateMessage(listener.DeviceType, result))
                      .SelectMany(InjectTestMode)
                      .OfType&lt;DeviceMessage&gt;()
                      .Do(async message =&gt; await PublishMessage(message)))
                      .Retry();
                  })).Retry();
  
  _listener = listeners.Subscribe(OnMessageReceive, OnError, OnComplete);
  </code></pre>