Warn when we force creating a non durable exchange

Adding warning logs so that users can detect the fallback with durable
exchanges.

Change-Id: Iabce0986fae6ed8838f1f94496b5994fc19cc5ef
This commit is contained in:
Hervé Beraud 2022-10-18 14:17:19 +02:00
parent 1fd461647f
commit b83b87d49e
1 changed files with 1 additions and 0 deletions

View File

@ -1274,6 +1274,7 @@ class Connection(object):
# from the one used first.
if "PRECONDITION_FAILED - inequivalent arg 'durable'" \
in str(err):
LOG.warning("Force creating a non durable exchange.")
exchange.durable = False
exchange(self.channel).declare()
self._declared_exchanges.add(exchange.name)