summaryrefslogtreecommitdiffstats
path: root/nova/rpc
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-06-12 17:07:18 -0400
committerRussell Bryant <rbryant@redhat.com>2012-06-13 09:11:45 -0400
commitd15f3034dfab05ef0ec02b4e353b3dfa1512db35 (patch)
treef40b18262abac99fd888f000ced91bf7407e9d3b /nova/rpc
parent9e0c6845562dcd8e294841ac06aad559247de0cf (diff)
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: I0370293807f0282e1dbdd59246f70be031e888a9
Diffstat (limited to 'nova/rpc')
-rw-r--r--nova/rpc/impl_qpid.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/rpc/impl_qpid.py b/nova/rpc/impl_qpid.py
index 4044ec03a..c5ab4a1d5 100644
--- a/nova/rpc/impl_qpid.py
+++ b/nova/rpc/impl_qpid.py
@@ -137,7 +137,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:
+ LOG.exception(_("Failed to process message... skipping it."))
+ finally:
+ self.session.acknowledge(message)
def get_receiver(self):
return self.receiver