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 same consumer, 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 https://bugzilla.redhat.com/show_bug.cgi?id=433036.