diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-04-11 15:47:39 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-04-11 15:47:39 +0100 |
commit | 35f18fd5135385be672a421e5a50a3f2fc29a208 (patch) | |
tree | 10dbd785d2526778ac79f5dd0029e04d6c465d88 | |
parent | 03d32eeded42110d0b61de29d02f632e98bd4842 (diff) | |
download | rabbitmq-server-35f18fd5135385be672a421e5a50a3f2fc29a208.tar.gz |
Deduplicate routes (needed for sender routing).bug24862
-rw-r--r-- | src/rabbit_exchange.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 39fccec3..0249155c 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -246,7 +246,8 @@ info_all(VHostPath, Items) -> map(VHostPath, fun (X) -> info(X, Items) end). route(#exchange{name = #resource{name = <<"">>, virtual_host = VHost}}, #delivery{message = #basic_message{routing_keys = RKs}}) -> QNames = [rabbit_misc:r(VHost, queue, RK) || RK <- RKs], - [QName || #amqqueue{name = QName} <- rabbit_amqqueue:lookup(QNames)]; + lists:usort([QName || #amqqueue{name = QName} + <- rabbit_amqqueue:lookup(QNames)]); route(X = #exchange{name = XName}, Delivery) -> route1(Delivery, {queue:from_list([X]), XName, []}). |