Java concurrent queue for broadcast?
<p>I have a bunch of producer threads adding to a <code>BlockingQueue</code> and one worker thread taking objects. Now I want to extend this so two worker threads are taking objects, but doing different work on the objects. Here's the twist: <em>I want an object that has been put on the queue to be worked on by <strong>both</strong> of the receiving threads</em>.</p>

<p>If I keep using BlockingQueue, the two threads will compete for the objects, and only one of the worker threads will get the object.</p>

<p>So I'm looking for something similar to BlockingQueue, but with broadcast behaviour.</p>

<p>The application: The producer threads are actually creating performance measurements, and one of the workers is writing the measurements to a file, while the other worker is aggregating statistics.</p>

<p>I'm using Java 6.</p>

<p>So does such a mechanism exist? In Java SE? Elsewhere? Or do I need to code my own?</p>

<p>I'm looking for solutions with a small footprint - I'd prefer not to install some framework to do this.</p>
