Commit 2775568e authored by Mehdi Abaakouk's avatar Mehdi Abaakouk Committed by Matt Riedemann
Browse files

rabbit: restore synchronous ack/requeue

Note this change also contains the fix for the regression it
introduced.

In https://review.openstack.org/#/c/436958, we fix a thread safety
issue. But we make the ack/requeue of message asynchronous. In nominal
case, it works, but if network/rabbit connection issue occurs this
can result to rpc call handle twice. By chance we double check already
processed message ids, and drop duplicates, but that if the message
goes to another node, the mitigation won't work.

This restore the previous behavior, to ensure we run application
callback of rpc.call/rpc.cast only when the message have been
successfully ack.

(cherry picked from commit da02bc21)

Fix rabbitmq driver with blocking executor

We recently move ack/requeue of messages in main/polling thread
of rabbitmq drivers. And break the blocking executor.

This one is not tested by any tests and now deprecated.

This change workaround the issue until we completely remove the
blocking executor.

Closes-bug: #1694728
(cherry picked from commit 8ee5ae13)

Change-Id: I62b9e09513e3ebfebc64a941d4b21b6c053b511d
parent a4203b79