diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-06-29 19:03:48 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-06-29 19:03:48 +0000 |
| commit | e10daec4f6ea77c7544f5ad1123b3d82e0a2989e (patch) | |
| tree | a4e83f6c4c94a949a20a7058dad0c9436413b37e | |
| parent | fd7bd882049cc971300d22b2c7ad6d97db2e4cc0 (diff) | |
| parent | 45e5ae28377abc0eefd2e71ef553380b25283c48 (diff) | |
| download | nova-e10daec4f6ea77c7544f5ad1123b3d82e0a2989e.tar.gz nova-e10daec4f6ea77c7544f5ad1123b3d82e0a2989e.tar.xz nova-e10daec4f6ea77c7544f5ad1123b3d82e0a2989e.zip | |
Sets 'exclusive=True' on Fanout amqp queues. We create the queues with uuids, so the consumer should have exclusive access and they should get removed when done (service stop). exclusive implies auto_delete. Fixes lp:803165
| -rw-r--r-- | nova/rpc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/rpc.py b/nova/rpc.py index 2e78a31e7..9f0b507fd 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -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)) |
