Red Hat Bugzilla – Bug 433035
fanout example doesn't fan-out
Last modified: 2012-09-21 09:02:03 EDT
Description of problem:
The fanout example is poorly written, it does not actually demonstrate what the
fan-out exchange does.
The fanout exchange copies messages to every queue that is bound to it, however
the example only binds
a single queue, so there's nowhere to fan out to. The listeners all bind to the
same queue and compete
for messages. If there are just a few then they're likely to all end up on the
because the broker delivers messages in batches for higher throughput.
I've attached a modified listener.cpp that creates a private queue for each
listener. If you start multiple
listeners you'll see they all get all the messages.
New example in revision 628151
It does fan out now, in both Python and C++.
There is no fanout example in Java. We should fix that for GA.
Closing - the Java part of this issue is recorded in