private void ThreadFunc() { do { // Consume message var message = default(T); try { message = MessageBus.Consume(); } catch (Exception e) { Diagnostics.DebugException(e, "Doing a bus Consume"); } // Produce try { InternalProduce(message); } catch (Exception e) { Diagnostics.DebugException(e, "Processing"); } // SendNext try { SendNext(message); } catch (Exception e) { Diagnostics.DebugException(e, "Doing a SendNext"); } } while (true); }