-
-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
messaging: Make exchange/queue name prefix configurable
This, adds a new messaging.prefix option that gets modified to include the test slot as needed. Exchanges are defined as module level vars initialized on import. But, oslo_config is not setup yet at import time, so delay applying the new prefix setting until just before they get created in RabbitMQ. Luckily, Exchange() objects are lightweight objects that just hold the exchange name and type. They could do more, but we don't bind them to a channel. Because the exchange objects merely hold strings, and because they are basically singletons (module-level vars), we can safely update the exchange name just before declaring it in RabbitMQ. From that point on, everything that uses a singleton exchange object will get the updated name.
- Loading branch information
1 parent
3c99f88
commit af407ca
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters