diff options
author | shenjiatong <yshxxsjt715@gmail.com> | 2020-07-03 15:51:21 +0800 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2021-04-15 13:59:07 +0000 |
commit | b2acc6663f6c3f60e07cdeb1eae97fd1210a4d81 (patch) | |
tree | a7cb0cc21a2bed4922a55f144a1bfec9c3d85e43 /releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml | |
parent | 0c47ed4e1b03dd6999a3ae464eb311297a8ac4cd (diff) | |
download | oslo-messaging-b2acc6663f6c3f60e07cdeb1eae97fd1210a4d81.tar.gz |
Cancel consumer if queue down
Previously, we have switched to use default exchanges
to avoid excessive amounts of exchange not found messages.
But it does not actually solve the problem because
reply_* queue is already gone and agent will not receive callbacks.
after some debugging, I found under some circumstances
seems rabbitmq consumer does not receive basic cancel
signal when queue is already gone. This might due to
rabbitmq try to restart consumer when queue is down
(for example when split brain). In such cases,
it might be better to fail early.
by reading the code, seems like x-cancel-on-ha-failover
is not dedicated to mirror queues only, https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_channel.erl#L1894,
https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_channel.erl#L1926.
By failing early, in my own test setup,
I could solve a certain case of exchange not found problem.
Change-Id: I2ae53340783e4044dab58035bc0992dc08145b53
Related-bug: #1789177
Depends-On: https://review.opendev.org/#/c/747892/
(cherry picked from commit 196fa877a90d7eb0f82ec9e1c194eef3f98fc0b1)
(cherry picked from commit 0a432c7fb107d04f7a41199fe9a8c4fbd344d009)
(cherry picked from commit 5de11fa752ab8e37b95b1785f4c71210bf473f0c)
Diffstat (limited to 'releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml')
-rw-r--r-- | releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml b/releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml new file mode 100644 index 0000000..affab65 --- /dev/null +++ b/releasenotes/notes/add-enable_cancel_on_failover-22ac472b93dd3a23.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Add a new option `enable_cancel_on_failover` for rabbitmq driver + which when enabled, will cancel consumers when queue appears + to be down. |