# An Alternative Multi-Producer Approach

DevFeed: [An Alternative Multi-Producer Approach](<https://devfeed.tech/articles/an-alternative-multi-producer-approach-30651.md>)

Original publisher: [Read original article](<http://bad-concurrency.blogspot.com/2013/12/an-alternative-multi-producer-approach.html>)

Author: Michael Barker (noreply@blogger.com)

Published: 2013-12-15T19:42:00Z

Content type: article

Language: en

Sources: [Bad Concurrency](<https://devfeed.tech/sources/bad-concurrency.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [messages](<https://devfeed.tech/tags/messages.md>), [optimisations](<https://devfeed.tech/tags/optimisations.md>), [performance](<https://devfeed.tech/tags/performance.md>), [structure](<https://devfeed.tech/tags/structure.md>), [threads](<https://devfeed.tech/tags/threads.md>)

## AI overview

The article explores an alternative multi-producer design for the Disruptor by using one ring buffer with a SingleProducerSequencer per producer and a custom event processor that polls multiple buffers. A throughput test with three producers and one consumer suggests the approach has merit, while the author notes unresolved sequence-value and wait-strategy design issues.

## Source excerpt

Recently on InfoQ, Aliaksei Papou posted an article on some of his experiments with high performance interchange of messages between threads. There were a number of examples within the article, but I am going to focus on the multi-producer case. One of the optimisations that the article showed was that if you knew the number of producers that you have at initialisation time you can build a structure that significantly reduces contention. The existing MultiProducerSequencer does not have this constraint, which is essential for a large number of use cases. However, I wanted to see what we could achieve if I applied this approach to this Disruptor. Read more "