5.3. Writing Fanout Applications in C++
This section describes two programs that illustrate the use of a Fanout exchange.
listener.cpp makes a unique queue private for each instance of the listener, and binds that queue to the fanout exchange. All messages sent to the fanout exchange are delivered to each listener's queue.
fanout_producer.cpp publishes messages to the fanout exchange. It does not use a routing key, which is not needed by the fanout exchange.