From c70bf40be4e72060d27b542e10484b4f89d3ccaa Mon Sep 17 00:00:00 2001 From: QingchuanHao Date: Tue, 11 Aug 2015 07:45:01 +0800 Subject: [PATCH] Fix message missing after duplicated message error Message will not be handle after acknowledge failure, but it will store in cache to prohibit handle duplicate message by skipping it. So a message can be missed if client receive a duplicate message. Fix this problem by store the message info in cache after a successfuly message acknowledgment. Change-Id: I907a58199eeadac22c31490111ec51ee6dd874d5 --- oslo_messaging/_drivers/amqpdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_messaging/_drivers/amqpdriver.py b/oslo_messaging/_drivers/amqpdriver.py index c1d0f52be..1110e54c2 100644 --- a/oslo_messaging/_drivers/amqpdriver.py +++ b/oslo_messaging/_drivers/amqpdriver.py @@ -102,8 +102,8 @@ class AMQPIncomingMessage(base.IncomingMessage): self._send_reply(conn, ending=True) def acknowledge(self): - self.listener.msg_id_cache.add(self.unique_id) self.acknowledge_callback() + self.listener.msg_id_cache.add(self.unique_id) def requeue(self): # NOTE(sileht): In case of the connection is lost between receiving the