Show Table of Contents
10.4.5. Create and Delete Exchange Routes
- To create and delete exchange routes, use the following syntax:
qpid-route [OPTIONS] route add <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] route del <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] flush [<broker>]
- For example, use the following command to create an exchange route that routes messages that match the binding key
global.#from theamq.topicexchange on the source brokerlocalhost:10002to theamq.topicexchange on the destination brokerlocalhost:10001:$ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
- In many applications, messages published to the destination exchange must also be routed to the source exchange. Create a second exchange route, reversing the roles of the two exchanges:
$ qpid-route route add localhost:10002 localhost:10001 amq.topic global.#
- Specify the
-doption to persist the exchange route. The exchange route will be restored if one or both of the brokers is restarted:$ qpid-route -d route add localhost:10001 localhost:10002 amq.fanout public
- The
delcommand takes the same arguments as theaddcommand. Use the following command to delete the first exchange route described above:$ qpid-route route del localhost:10001 localhost:10002 amq.topic global.#

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.