Skip to content

Commit

Permalink
Merge pull request #3230 from rabbitmq/fix-notify-limiter
Browse files Browse the repository at this point in the history
Fix channel rate limiter for ack messages

(cherry picked from commit 1b5c7e3)
  • Loading branch information
gerhard committed Jul 27, 2021
1 parent 995d74a commit 6c38f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/rabbit/src/rabbit_channel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2121,13 +2121,13 @@ notify_limiter(Limiter, Acked) ->
%% common case.
case rabbit_limiter:is_active(Limiter) of
false -> ok;
true -> case lists:foldl(fun ({_, CTag, _, _}, Acc) when is_integer(CTag) ->
true -> case lists:foldl(fun (#pending_ack{tag = CTag}, Acc) when is_integer(CTag) ->
%% Quorum queues use integer CTags
%% classic queues use binaries
%% Quorum queues do not interact
%% with limiters
Acc;
({_, _, _, _}, Acc) -> Acc + 1
(_, Acc) -> Acc + 1
end, 0, Acked) of
0 -> ok;
Count -> rabbit_limiter:ack(Limiter, Count)
Expand Down

0 comments on commit 6c38f22

Please sign in to comment.