Ce contenu n'est pas disponible dans la langue sélectionnée.

10.4.5. Create and Delete Exchange Routes


  1. 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>]
    
    Copy to Clipboard Toggle word wrap
  2. For example, use the following command to create an exchange route that routes messages that match the binding key global.# from the amq.topic exchange on the source broker localhost:10002 to the amq.topic exchange on the destination broker localhost:10001:
    $ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
    
    Copy to Clipboard Toggle word wrap
  3. 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.#
    
    Copy to Clipboard Toggle word wrap
  4. Specify the -d option 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
    
    Copy to Clipboard Toggle word wrap
  5. The del command takes the same arguments as the add command. Use the following command to delete the first exchange route described above:
    $ qpid-route route del localhost:10001 localhost:10002 amq.topic global.#
    
    Copy to Clipboard Toggle word wrap
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat