diff options
| author | Hengqing Hu <hudayou@hotmail.com> | 2012-06-05 14:54:28 +0800 |
|---|---|---|
| committer | Hengqing Hu <hudayou@hotmail.com> | 2012-06-05 14:54:28 +0800 |
| commit | d28f5bdaab5e620c6e4ece839526495bc632a2b4 (patch) | |
| tree | f4a559e8c6db05c69b8d08a643f13c71a88653df | |
| parent | 626f64a716651af3654b0f7dedab0a70988e53c5 (diff) | |
Finally ack consumed message
To avoid bad messages fill up the queue.
Change-Id: Id57ff33cfcacf698f89fa7f1020c0c887ebe14ed
| -rw-r--r-- | nova/rpc/impl_kombu.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py index b9fb081bd..2c14087be 100644 --- a/nova/rpc/impl_kombu.py +++ b/nova/rpc/impl_kombu.py @@ -137,9 +137,10 @@ class ConsumerBase(object): message = self.channel.message_to_python(raw_message) try: callback(message.payload) - message.ack() except Exception: LOG.exception(_("Failed to process message... skipping it.")) + finally: + message.ack() self.queue.consume(*args, callback=_callback, **options) |
