summaryrefslogtreecommitdiff
path: root/src
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
commitb9e8a5ef2ad7e7a042424f938296e35330baf05f (patch)
treea5be5e166882fcd7e0a7342478fa7bb6dde149fb /src
parent2456e07559553e4e6cfc7750b3a122f1e99e0769 (diff)
downloadrabbitmq-server-git-b9e8a5ef2ad7e7a042424f938296e35330baf05f.tar.gz
undo accidental change
Diffstat (limited to 'src')
-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 5388d26601..299747d141 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) ->