10.4.8. View Routes
Procedure 10.1. Using the route list
command
- Create the following two routes:
$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic $ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
- Use the
route list
command to show the routes associated with the broker:$ qpid-route route list localhost:10003 localhost:10003 localhost:10004 fed.topic <dynamic>
Note that this shows only one of the two routes created, namely the route for whichlocalhost:10003
is a destination. - To view the route for which
localhost:10004
is a destination, runroute list
onlocalhost:10004
:$ qpid-route route list localhost:10004 localhost:10004 localhost:10003 fed.topic <dynamic>
Procedure 10.2. Using the route map
command
- The
route map
command shows all routes associated with a broker, and recursively displays all routes for brokers involved in federation relationships with the given broker. For example, run theroute map
command for the two brokers configured above:$ qpid-route route map localhost:10003 Finding Linked Brokers: localhost:10003... Ok localhost:10004... Ok Dynamic Routes: Exchange fed.topic: localhost:10004 <=> localhost:10003 Static Routes: none found
Note that the two dynamic exchange links are displayed as though they were one bidirectional link. Theroute map
command is helpful for larger, more complex networks. - Configure a network with 16 dynamic exchange routes:
qpid-route dynamic add localhost:10001 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10001 fed.topic qpid-route dynamic add localhost:10003 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10003 fed.topic qpid-route dynamic add localhost:10004 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10004 fed.topic qpid-route dynamic add localhost:10002 localhost:10005 fed.topic qpid-route dynamic add localhost:10005 localhost:10002 fed.topic qpid-route dynamic add localhost:10005 localhost:10006 fed.topic qpid-route dynamic add localhost:10006 localhost:10005 fed.topic qpid-route dynamic add localhost:10006 localhost:10007 fed.topic qpid-route dynamic add localhost:10007 localhost:10006 fed.topic qpid-route dynamic add localhost:10006 localhost:10008 fed.topic qpid-route dynamic add localhost:10008 localhost:10006 fed.topic
- Use the
route map
command starting with any one broker to see the entire network:$ qpid-route route map localhost:10001 Finding Linked Brokers: localhost:10001... Ok localhost:10002... Ok localhost:10003... Ok localhost:10004... Ok localhost:10005... Ok localhost:10006... Ok localhost:10007... Ok localhost:10008... Ok Dynamic Routes: Exchange fed.topic: localhost:10002 <=> localhost:10001 localhost:10003 <=> localhost:10002 localhost:10004 <=> localhost:10002 localhost:10005 <=> localhost:10002 localhost:10006 <=> localhost:10005 localhost:10007 <=> localhost:10006 localhost:10008 <=> localhost:10006 Static Routes: none found