Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This utility is to create federated networks of brokers, This allows you for forward messages between brokers in a network. Think of it like an IP network and static routes are configured with direct exchanges, and dynamic routes configured with the topic exchanges. The '*' and '#' can be used to create IP masking type pattern as you would with IP address except you are using the topic names.

The utility thus looks much like iproute (smile)

Messages can be routed statically (using "qpid-route route add") where the bindings that control message forwarding are supplied in the route. Message routing can also be dynamic (using "qpid-route dynamic add") where the messages are automatically forwarded to clients based on their bindings to the local broker.

Code Block

$ qpid-route
Usage:  qpid-route [OPTIONS] link add  <dest-broker> <src-broker>
        qpid-route [OPTIONS] link del  <dest-broker> <src-broker>
        qpid-route [OPTIONS] link list [<dest-broker>]

        qpid-route [OPTIONS] route add   <dest-broker> <src-broker> <exchange> <routing-key> [tag] [exclude-list]
        qpid-route [OPTIONS] route del   <dest-broker> <src-broker> <exchange> <routing-key>
        qpid-route [OPTIONS] route list  [<dest-broker>]
        qpid-route [OPTIONS] route flush [<dest-broker>]
        qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker> <exchange> [tag] [exclude-list]
      
Code Block

$ ./qpid-route --help
Usage:  qpid-route [OPTIONS] adddynamic del  <dest-broker> <src-broker> <exchange> <routing-key>


Options:
    -v [ --verbose ]         qpid-route OPTIONS delVerbose output
    <dest-broker>q [ <src-broker> <exchange> <routing-key>
    --quiet ]           Quiet output, don't print duplicate warnings
    qpid-route OPTIONS list  <dest-broker>
d [ --durable ]         Added qpid-routeconfiguration OPTIONSshall flush <dest-broker>
Options:be durable
    -se [ --specdel-empty-filelink ] PATH (/usr/share/amqp/amqp.0-10.xml)  Delete link after deleting last route on the link
    -vt <transport> [ --verbosetransport <transport>]  
            Verbose output
    -q [ --quiet ]            Specify transport to use Quietfor outputlinks, don'tdefaults print duplicate warningsto tcp

  dest-broker and src-broker are in the form:  [username/password@] hostname | ip-address [:<port>]
  ex:  localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost

A few examples:

Code Block

qpid-route dynamic add host1 host2 fed.topic
./qpidd_qpid-route dynamic add host2 host1 fed.topic

qpid-route -v route add host1 host2 hub1.topic hub2.topic.stock.buy
./qpidd_qpid-route -v route add host1 host2 hub1.topic hub2.topic.stock.sell
./qpidd_qpid-route -v route add host1 host2 hub1.topic 'hub2.topic.stock.#'
./qpidd_qpid-route -v route add host1 host2 hub1.topic 'hub2.#'
./qpidd_qpid-route -v route add host1 host2 hub1.topic 'hub2.topic.#'
./qpidd_qpid-route -v route add host1 host2 hub1.topic 'hub2.global.#'

...