summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_queue_location_validator.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl
index df2dc33140..d0dc04fbb1 100644
--- a/src/rabbit_queue_location_validator.erl
+++ b/src/rabbit_queue_location_validator.erl
@@ -58,7 +58,11 @@ module(Strategy) when is_binary(Strategy) ->
{error, not_found} -> no_location_strategy;
T ->
case rabbit_registry:lookup_module(queue_master_locator, T) of
- {ok, Module} -> {ok, Module};
+ {ok, Module} ->
+ case code:which(Module) of
+ non_existing -> no_location_strategy;
+ _ -> {ok, Module}
+ end;
_ -> no_location_strategy
end
end.