summaryrefslogtreecommitdiffstats
path: root/nova/rpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/rpc.py')
-rw-r--r--nova/rpc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/nova/rpc.py b/nova/rpc.py
index 2e78a31e7..e2771ca88 100644
--- a/nova/rpc.py
+++ b/nova/rpc.py
@@ -219,7 +219,7 @@ class AdapterConsumer(Consumer):
return
self.pool.spawn_n(self._process_data, msg_id, ctxt, method, args)
- @exception.wrap_exception
+ @exception.wrap_exception()
def _process_data(self, msg_id, ctxt, method, args):
"""Thread that maigcally looks for a method on the proxy
object and calls it.
@@ -275,6 +275,11 @@ class FanoutAdapterConsumer(AdapterConsumer):
unique = uuid.uuid4().hex
self.queue = '%s_fanout_%s' % (topic, unique)
self.durable = False
+ # Fanout creates unique queue names, so we should auto-remove
+ # them when done, so they're not left around on restart.
+ # Also, we're the only one that should be consuming. exclusive
+ # implies auto_delete, so we'll just set that..
+ self.exclusive = True
LOG.info(_('Created "%(exchange)s" fanout exchange '
'with "%(key)s" routing key'),
dict(exchange=self.exchange, key=self.routing_key))
@@ -355,6 +360,7 @@ class FanoutPublisher(Publisher):
self.exchange = '%s_fanout' % topic
self.queue = '%s_fanout' % topic
self.durable = False
+ self.auto_delete = True
LOG.info(_('Creating "%(exchange)s" fanout exchange'),
dict(exchange=self.exchange))
super(FanoutPublisher, self).__init__(connection=connection)