summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-01-26 17:35:43 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-01-26 17:35:43 +0000
commitc2062ff3b9ec304956c7a494caeed25c7cd8a375 (patch)
treece683bafce6ce577e15450cf5b53d29e2bc0a9e9
parentc8f30537a924891f550484321411ba8b5d7d571f (diff)
downloadrabbitmq-server-bug22252.tar.gz
On recover with requeue=true, notify the limiter of the requeued messagesbug22252
-rw-r--r--src/rabbit_channel.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 91559ea6..b186783e 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -735,7 +735,8 @@ handle_method(#'basic.qos'{prefetch_count = PrefetchCount},
{reply, #'basic.qos_ok'{}, State#ch{limiter_pid = LimiterPid2}};
handle_method(#'basic.recover_async'{requeue = true},
- _, State = #ch{unacked_message_q = UAMQ}) ->
+ _, State = #ch{unacked_message_q = UAMQ,
+ limiter_pid = LimiterPid}) ->
ok = fold_per_queue(
fun (QPid, MsgIds, ok) ->
%% The Qpid python test suite incorrectly assumes
@@ -745,6 +746,7 @@ handle_method(#'basic.recover_async'{requeue = true},
rabbit_amqqueue:requeue(
QPid, lists:reverse(MsgIds), self())
end, ok, UAMQ),
+ ok = notify_limiter(LimiterPid, UAMQ),
%% No answer required - basic.recover is the newer, synchronous
%% variant of this method
{noreply, State#ch{unacked_message_q = queue:new()}};