The type you are probably the most interested in is Disruptor<T>
. It contains a ring buffer and has convenient methods to register consumers. The ring buffer has a fixed capacity and cannot be resized, so you need to take a moment to think about the appropriate capacity for your use case.
// Size of the ring buffer, must be power of 2.
const int bufferSize = 1024;
// Create the disruptor
var disruptor = new Disruptor<SampleEvent>(() => new SampleEvent(), bufferSize);