summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2008-12-19 22:08:01 +0000
committerMatthias Radestock <matthias@lshift.net>2008-12-19 22:08:01 +0000
commit4e1a9453e9efbac6e40a5042ad899ae528c4a27e (patch)
treea5be5e166882fcd7e0a7342478fa7bb6dde149fb
parent37d13274339d3a287a10c47be625ff5b53a654f1 (diff)
downloadrabbitmq-server-bug20045.tar.gz
undo accidental changebug20045
-rw-r--r--src/rabbit_exchange.erl14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index 5388d266..299747d1 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -220,14 +220,6 @@ simple_publish(Mandatory, Immediate,
{error, Error} -> {error, Error}
end.
-route(X, R) ->
- case get({route, X, R}) of
- undefined -> Res = route2(X, R),
- put({route, X, R}, Res),
- Res;
- Other -> Other
- end.
-
%% return the list of qpids to which a message with a given routing
%% key, sent to a particular exchange, should be delivered.
%%
@@ -236,7 +228,7 @@ route(X, R) ->
%% current exchange types that is at most once.
%%
%% TODO: Maybe this should be handled by a cursor instead.
-route2(#exchange{name = Name, type = topic}, RoutingKey) ->
+route(#exchange{name = Name, type = topic}, RoutingKey) ->
Query = qlc:q([QName ||
#route{binding = #binding{
exchange_name = ExchangeName,
@@ -248,10 +240,10 @@ route2(#exchange{name = Name, type = topic}, RoutingKey) ->
topic_matches(BindingKey, RoutingKey)]),
lookup_qpids(mnesia:async_dirty(fun qlc:e/1, [Query]));
-route2(X = #exchange{type = fanout}, _) ->
+route(X = #exchange{type = fanout}, _) ->
route_internal(X, '_');
-route2(X = #exchange{type = direct}, RoutingKey) ->
+route(X = #exchange{type = direct}, RoutingKey) ->
route_internal(X, RoutingKey).
route_internal(#exchange{name = Name}, RoutingKey) ->