Show Table of Contents
4.8.5. Publish to Multiple Queues using the Fanout Exchange
All queues bound to a fanout exchange receive a copy of all messages sent to the exchange; so to publish to all consumers on a fanout exchange, send a message to the exchange.
- Python
import sys from qpid.messaging import * con = Connection("localhost:5672") con.open() try: ssn = con.session() tx = ssn.sender("amq.fanout") tx.send("Hello to all consumers bound to the amq.fanout exchange") finally: con.close()

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.