summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-06-12 17:17:13 -0400
committerRussell Bryant <rbryant@redhat.com>2012-06-13 09:13:31 -0400
commit341ae3b475f9aab85c9202995529b1d041a71b2b (patch)
tree89079a48a601871941dd4a977f35c773324c0d32 /openstack
parentcb0a0497e896634243a0e0a03da54e807bed0b46 (diff)
downloadoslo-341ae3b475f9aab85c9202995529b1d041a71b2b.tar.gz
oslo-341ae3b475f9aab85c9202995529b1d041a71b2b.tar.xz
oslo-341ae3b475f9aab85c9202995529b1d041a71b2b.zip
Add missing ack to impl_qpid.
Fix bug 1012374. Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that it received. This turned out to be a nasty oversight, resulting in unbounded message queue growth inside of the python-qpid library. This fixes it. Change-Id: I446530239e16701009c4db8407a344596bb17952
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/impl_qpid.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/openstack/common/rpc/impl_qpid.py b/openstack/common/rpc/impl_qpid.py
index 3c46309..78236f2 100644
--- a/openstack/common/rpc/impl_qpid.py
+++ b/openstack/common/rpc/impl_qpid.py
@@ -138,7 +138,12 @@ class ConsumerBase(object):
def consume(self):
"""Fetch the message and pass it to the callback object"""
message = self.receiver.fetch()
- self.callback(message.content)
+ try:
+ self.callback(message.content)
+ except Exception:
+ logging.exception(_("Failed to process message... skipping it."))
+ finally:
+ self.session.acknowledge(message)
def get_receiver(self):
return self.receiver