summaryrefslogtreecommitdiff
path: root/src/rabbit_exchange.erl
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2013-04-15 13:49:55 +0100
committerEmile Joubert <emile@rabbitmq.com>2013-04-15 13:49:55 +0100
commit46c993c708b742dafae8a80c92a36ba125bde771 (patch)
treef91f30fdd2be829de790d0552e7ab40d8cb48f22 /src/rabbit_exchange.erl
parent2fd4ad1946f21bc0a49c38a261b5c871379781ff (diff)
downloadrabbitmq-server-git-46c993c708b742dafae8a80c92a36ba125bde771.tar.gz
Ignore missing exchange decorators
Diffstat (limited to 'src/rabbit_exchange.erl')
-rw-r--r--src/rabbit_exchange.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index 6d111b8316..e7847673b4 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -113,8 +113,17 @@ recover() ->
callback(X, create, map_create_tx(Tx), [X])
end,
rabbit_durable_exchange),
+ report_missing_decorators(Xs),
[XName || #exchange{name = XName} <- Xs].
+report_missing_decorators(Xs) ->
+ Mods = lists:usort(lists:append([rabbit_exchange_decorator:select(raw, D) ||
+ #exchange{decorators = D} <- Xs])),
+ case [M || M <- Mods, code:which(M) =:= non_existing] of
+ [] -> ok;
+ M -> rabbit_log:warning("Missing exchange decorators: ~p~n", [M])
+ end.
+
callback(X = #exchange{type = XType,
decorators = Decorators}, Fun, Serial0, Args) ->
Serial = if is_function(Serial0) -> Serial0;