summaryrefslogtreecommitdiffstats
path: root/openstack/common/rpc/impl_kombu.py
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-09-06 14:37:52 -0400
committerRussell Bryant <rbryant@redhat.com>2012-09-11 10:38:39 -0400
commit16ad97c13fb296125a843d1dda31900994628727 (patch)
tree308482bd12c824e7d8884a59d26ce04df916fa51 /openstack/common/rpc/impl_kombu.py
parent1071b9da480d25e7cee556d7f9b483f8ac258ffb (diff)
downloadoslo-16ad97c13fb296125a843d1dda31900994628727.tar.gz
oslo-16ad97c13fb296125a843d1dda31900994628727.tar.xz
oslo-16ad97c13fb296125a843d1dda31900994628727.zip
Make projects define 'control_exchange'.
The 'control_exchange' option needs to have a project-specific default value. Just don't register this option and expect it to be registered by the project using this code, at least for now. ****** IMPORTANT NOTE WHEN IMPORTING THIS CHANGE ****** If you are importing this change into a project that uses rpc, you must add the control_exchange option in your code! ******************************************************* Change-Id: Ida5a8637c419e709bbf22fcad57b0f11c31bb959
Diffstat (limited to 'openstack/common/rpc/impl_kombu.py')
-rw-r--r--openstack/common/rpc/impl_kombu.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/openstack/common/rpc/impl_kombu.py b/openstack/common/rpc/impl_kombu.py
index 66cf0a9..294fc0a 100644
--- a/openstack/common/rpc/impl_kombu.py
+++ b/openstack/common/rpc/impl_kombu.py
@@ -210,10 +210,10 @@ class TopicConsumer(ConsumerBase):
'auto_delete': False,
'exclusive': False}
options.update(kwargs)
- exchange = kombu.entity.Exchange(name=conf.control_exchange,
- type='topic',
- durable=options['durable'],
- auto_delete=options['auto_delete'])
+ exchange = kombu.entity.Exchange(
+ name=rpc_amqp.get_control_exchange(conf),
+ type='topic', durable=options['durable'],
+ auto_delete=options['auto_delete'])
super(TopicConsumer, self).__init__(channel,
callback,
tag,
@@ -307,8 +307,9 @@ class TopicPublisher(Publisher):
'auto_delete': False,
'exclusive': False}
options.update(kwargs)
- super(TopicPublisher, self).__init__(channel, conf.control_exchange,
- topic, type='topic', **options)
+ super(TopicPublisher, self).__init__(channel,
+ rpc_amqp.get_control_exchange(conf), topic,
+ type='topic', **options)
class FanoutPublisher(Publisher):