summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Mazzoli <francesco@rabbitmq.com>2012-01-24 13:32:33 +0000
committerFrancesco Mazzoli <francesco@rabbitmq.com>2012-01-24 13:32:33 +0000
commitcd52acbb9d63e41a2181a10a4859719b639aa00d (patch)
treed91c4d5f7e6fd826a22082b46f42d939f4c2cb0f
parent7c4fe2bee9d9e9763c6af4f941fd84e341a89327 (diff)
downloadrabbitmq-server-cd52acbb9d63e41a2181a10a4859719b639aa00d.tar.gz
Protocol error instead of warning when routing through inert exchange.
I originally raised protocol errors in bind/unbind as well but that defies the purpose of this fixes since if a queue is bound to an exchange with invalid type the boot sequence fails since it tries to re-bind the queue.
-rw-r--r--src/rabbit_exchange_type_inert.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_exchange_type_inert.erl b/src/rabbit_exchange_type_inert.erl
index 393bb045..97b39b22 100644
--- a/src/rabbit_exchange_type_inert.erl
+++ b/src/rabbit_exchange_type_inert.erl
@@ -30,7 +30,10 @@ description() ->
serialise_events() -> false.
-route(_, _) -> ok.
+route(#exchange{name = Name}, _) ->
+ rabbit_misc:protocol_error(
+ command_invalid,
+ "cannot route message through inert exchange ~p", [Name]).
validate(_X) -> ok.
create(_Tx, _X) -> ok.