summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Bondarev <obondarev@mirantis.com>2018-08-27 12:18:58 +0400
committerOleg Bondarev <obondarev@mirantis.com>2018-09-25 07:59:28 +0000
commit3a5de89dd686dbd9660f140fdddd9c78b20e1632 (patch)
tree9239bedd6c70af0003b9e0c2e2768f01c8e618c1
parent815e25e55b73bacbe0dba61d153024d395864ded (diff)
downloadoslo-messaging-3a5de89dd686dbd9660f140fdddd9c78b20e1632.tar.gz
Use default exchange for direct messaging
Lots of exchanges create problems during failover under high load. Please see bug report for details. This is step 1 in the process: only using default exchange when publishing. Consumers will still consume on separate exchanges (and on default exchange by default) so this should be (and tested to be) a non-breaking and upgrade-friendly change. Step 2 is to update consumers to only listen on default exchange, to happen in T release. Change-Id: Id3603f4b7e1274b616d76e1c0c009d2ab7f6efb6 Closes-Bug: #1789177
-rw-r--r--oslo_messaging/_drivers/impl_rabbit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py
index d21f46e..067d167 100644
--- a/oslo_messaging/_drivers/impl_rabbit.py
+++ b/oslo_messaging/_drivers/impl_rabbit.py
@@ -1015,6 +1015,7 @@ class Connection(object):
responses for call/multicall
"""
+ # TODO(obondarev): use default exchange since T release
consumer = Consumer(exchange_name=topic,
queue_name=topic,
routing_key=topic,
@@ -1181,7 +1182,7 @@ class Connection(object):
def direct_send(self, msg_id, msg):
"""Send a 'direct' message."""
- exchange = kombu.entity.Exchange(name=msg_id,
+ exchange = kombu.entity.Exchange(name='', # using default exchange
type='direct',
durable=False,
auto_delete=True,