summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-08-18 16:08:53 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-08-18 16:08:53 +0100
commit7983305bf14d846774c37ca67dcf6ac1c88474b9 (patch)
tree9e5961724a4e5edb0bc8d08e40f638f6f4f1cedb
parent262692bcbcf35a918c40cc764e22f70fc4508027 (diff)
downloadrabbitmq-server-7983305bf14d846774c37ca67dcf6ac1c88474b9.tar.gz
Return 1 consumer.
-rw-r--r--src/rabbit_channel.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 472091d0..9da6ac44 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1109,14 +1109,15 @@ handle_method(#'exchange.unbind'{destination = DestinationNameBin,
SourceNameBin, exchange, DestinationNameBin, RoutingKey,
Arguments, #'exchange.unbind_ok'{}, NoWait, State);
-%% Note that all declares to these are effectively passive
+%% Note that all declares to these are effectively passive. If it
+%% exists it by definition has one consumer.
handle_method(#'queue.declare'{queue = <<"amq.rabbitmq.reply-to",
_/binary>> = QueueNameBin,
nowait = NoWait}, _,
State = #ch{virtual_host = VHost}) ->
QueueName = rabbit_misc:r(VHost, queue, QueueNameBin),
case declare_fast_reply_to(QueueNameBin) of
- exists -> return_queue_declare_ok(QueueName, NoWait, 0, 0, State);
+ exists -> return_queue_declare_ok(QueueName, NoWait, 0, 1, State);
not_found -> rabbit_misc:not_found(QueueName)
end;