Hi Mike,
Thanks for the clarification. I didn't confuse ring buffers with
queues, I confused things a bit further down the line. I have worked
before with SPMC and MPMC ring buffers, but the ones I used (in C)
only allowed one Consumer to pick up any given chunk of events,
because they were used for packet processing and you don't want
packets to be processed in duplicate multiple times.
Thus I wasn't used to the Disruptor's multicast use of the ring
buffer, as this is somewhat different from the more classical ring
buffer uses for handling packets.
In my case, I found it ran faster using the classic ThreadPoolExecutor
with a spinlock on the input for rate control when the queue fills up,
than it did using the WorkerPool. Of course, this makes sense, since
your code optimizes for multicast, and I wanted round-robin or some
other load-balanced method instead of multicasting.
Matthew.