Adding a new Rx BusNotifications API

The first cab of the rank is to expose error streams:
- MessageHasFailedAFirstLevelRetryAttempt
- MessageHasBeenSentToSecondLevelRetries
- MessageSentToErrorQueue
Here is a lock free impl -
https://github.com/Reactive-Extensions/Rx.NET/blob/master/Rx.NET/Source/System.Reactive.Linq/Reactive/Subjects/Subject.cs

On 15 October 2014 16:52, Simon Cropp <notifications@github.com> wrote:

> In src/NServiceBus.Core/ObservableList.cs:
>
> > +            }
> > +
> > +            lock (gate)
> > +            {
> > +                CheckDisposed();
> > +
> > +                observers.Add(observer);
> > +
> > +                return new Unsubscriber(this, observer);
> > +            }
> > +        }
> > +
> > +        public void Add(T step)
> > +        {
> > +            // If the observers list was immutable we could remove this lock
> > +            lock (gate)
>
> two things come to mind. a reader writer lock. and clone the list in the
> thread safe code so u dont need to do the OnNext inside the lock.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Particular/NServiceBus/pull/2473/files#r18877159>.
>