From d778aa5a4487f3f45edcb6c0a345f93d7fdeb148 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti <kgiusti@gmail.com> Date: Fri, 7 Apr 2017 13:23:55 -0400 Subject: [PATCH] [AMQP 1.0] if RPC call is configured as presettled ignore acks The pre-settled configuration option was being ignored in the case of RPC call transfers. Change-Id: I35989c8a653bac0d9a7c3e33a8af2027574f4bd9 Closes-Bug: 1680905 --- oslo_messaging/_drivers/amqp1_driver/controller.py | 4 ++-- oslo_messaging/_drivers/impl_amqp1.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/oslo_messaging/_drivers/amqp1_driver/controller.py b/oslo_messaging/_drivers/amqp1_driver/controller.py index f0d073b8d..78a6a7c4f 100644 --- a/oslo_messaging/_drivers/amqp1_driver/controller.py +++ b/oslo_messaging/_drivers/amqp1_driver/controller.py @@ -190,9 +190,9 @@ class RPCCallTask(SendTask): """Performs an RPC Call. Sends the request and waits for a response from the destination. """ - def __init__(self, target, message, deadline, retry): + def __init__(self, target, message, deadline, retry, wait_for_ack): super(RPCCallTask, self).__init__("RPC Call", message, target, - deadline, retry, wait_for_ack=True) + deadline, retry, wait_for_ack) self._reply_link = None self._reply_msg = None self._msg_id = None diff --git a/oslo_messaging/_drivers/impl_amqp1.py b/oslo_messaging/_drivers/impl_amqp1.py index e5eb03669..866cc917c 100644 --- a/oslo_messaging/_drivers/impl_amqp1.py +++ b/oslo_messaging/_drivers/impl_amqp1.py @@ -303,7 +303,8 @@ class ProtonDriver(base.BaseDriver): expire = compute_timeout(self._default_send_timeout) if wait_for_reply: ack = not self._pre_settle_call - task = controller.RPCCallTask(target, request, expire, retry) + task = controller.RPCCallTask(target, request, expire, retry, + wait_for_ack=ack) else: ack = not self._pre_settle_cast task = controller.SendTask("RPC Cast", request, target, expire,