diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 17:35:43 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 17:35:43 +0000 |
| commit | 36661cc567b10297605c78c50ed5e9c417dbff0e (patch) | |
| tree | ce683bafce6ce577e15450cf5b53d29e2bc0a9e9 | |
| parent | 974712493c62eaf8e69e98dd9caa5dbcfecee0dd (diff) | |
| download | rabbitmq-server-git-36661cc567b10297605c78c50ed5e9c417dbff0e.tar.gz | |
On recover with requeue=true, notify the limiter of the requeued messages
| -rw-r--r-- | src/rabbit_channel.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 91559ea6c9..b186783e60 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()}}; |
