summaryrefslogtreecommitdiff
path: root/src/rabbit_exchange_type_topic.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-09-11 23:46:41 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-09-11 23:46:41 +0100
commitf182b6135b803e0d77887046ad5fb6bb7adddea5 (patch)
treec2b5c09c192929e1ee61f4a7472490ff01bfcbc7 /src/rabbit_exchange_type_topic.erl
parent432aefa0b24e199ec5b694da32187b777348cf61 (diff)
downloadrabbitmq-server-f182b6135b803e0d77887046ad5fb6bb7adddea5.tar.gz
Implement exchange-to-exchange bindings
Diffstat (limited to 'src/rabbit_exchange_type_topic.erl')
-rw-r--r--src/rabbit_exchange_type_topic.erl11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rabbit_exchange_type_topic.erl b/src/rabbit_exchange_type_topic.erl
index e796acf3..f4a9c904 100644
--- a/src/rabbit_exchange_type_topic.erl
+++ b/src/rabbit_exchange_type_topic.erl
@@ -58,13 +58,12 @@ description() ->
[{name, <<"topic">>},
{description, <<"AMQP topic exchange, as per the AMQP specification">>}].
-publish(#exchange{name = Name}, Delivery =
+publish(#exchange{name = Name},
#delivery{message = #basic_message{routing_key = RoutingKey}}) ->
- rabbit_router:deliver(rabbit_router:match_bindings(
- Name, fun (#binding{key = BindingKey}) ->
- topic_matches(BindingKey, RoutingKey)
- end),
- Delivery).
+ rabbit_router:match_bindings(Name,
+ fun (#binding{key = BindingKey}) ->
+ topic_matches(BindingKey, RoutingKey)
+ end).
split_topic_key(Key) ->
string:tokens(binary_to_list(Key), ".").