diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2019-10-14 20:19:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-14 20:19:56 +0200 |
| commit | 46a0181bc9729f20fad631c779dfbb817c71c206 (patch) | |
| tree | b07c6aeca51bd02b2d34f634fb0a750c42da245d /src | |
| parent | a7f3dce5b366d88b8f09470b2a897298c00aeeeb (diff) | |
| parent | a629eefa9b514ebb30b2fece56d9d4d81fded6bc (diff) | |
| download | rabbitmq-server-git-46a0181bc9729f20fad631c779dfbb817c71c206.tar.gz | |
Merge pull request #2139 from rabbitmq/ignore-queue-master-locator
Make it possible to bypass queue master locator when declaring a queue
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 540e0789ca..925e7915cb 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -309,9 +309,14 @@ do_declare(Q, _Node) when ?amqqueue_is_quorum(Q) -> declare_classic_queue(Q, Node) -> QName = amqqueue:get_name(Q), VHost = amqqueue:get_vhost(Q), - Node1 = case rabbit_queue_master_location_misc:get_location(Q) of - {ok, Node0} -> Node0; - {error, _} -> Node + Node1 = case Node of + {ignore_location, Node0} -> + Node0; + _ -> + case rabbit_queue_master_location_misc:get_location(Q) of + {ok, Node0} -> Node0; + {error, _} -> Node + end end, Node1 = rabbit_mirror_queue_misc:initial_queue_node(Q, Node1), case rabbit_vhost_sup_sup:get_vhost_sup(VHost, Node1) of |
