diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-01-30 11:17:23 +0000 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-01-30 11:17:23 +0000 |
| commit | f49fc3133a7a785374293d7f9beab2ee7df122f2 (patch) | |
| tree | 0e13ef58895695c952d089378fd48018076ab1d4 /src | |
| parent | f74a2f7fc141c6fbebe10afd86867bb1c4e42d56 (diff) | |
| download | rabbitmq-server-git-f49fc3133a7a785374293d7f9beab2ee7df122f2.tar.gz | |
check that dlx is defined is dl-rk is set
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index e928008172..ac64958e18 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -358,8 +358,11 @@ check_integer_argument({Type, Val}, _Args, _VHostPath) when Val > 0 -> check_integer_argument({_Type, Val}, _Args, _VHostPath) -> {error, {value_zero_or_less, Val}}. -check_exchange_argument(undefined, _Args, _VHostPath) -> - ok; +check_exchange_argument(undefined, Args, _VHostPath) -> + case rabbit_misc:table_lookup(Args, <<"x-dead-letter-routing-key">>) of + undefined -> ok; + _ -> {error, routing_key_but_no_dlx_defined} + end; check_exchange_argument({longstr, Val}, _Args, VHostPath) -> try rabbit_misc:r(VHostPath, exchange, Val) of _Exchange -> ok |
