summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2014-02-24 09:25:32 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2014-02-24 09:25:32 +0000
commit650fff1b3a839decd9bb4842fcc199936ef16e26 (patch)
tree0069a56b5051bb6c14029db6cbca911cbe5a88c5 /src
parentf64397eb1861eceb6eb3052358ab6bfb64c78e20 (diff)
downloadrabbitmq-server-git-650fff1b3a839decd9bb4842fcc199936ef16e26.tar.gz
always prioritise acks (and resume)
The former, so that we preserve ack ordering which, while of no semantic relevance, is good for performance since it allows us to optimise for the common acks-in-order case. The latter since it unblocks a queue from delivering messages and thus is conducive to keeping queue lengths short. We prioritise acks higher than most other messages since they are the only high-frequency message which is guaranteed to free up resources. Prioritising ack and resume all the time is safe since flow control places an upper bound on how many of these we can get, thus preventing starvation of senders of lower-priority messages.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue_process.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index a1997376c1..11aabcd566 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -859,9 +859,9 @@ prioritise_cast(Msg, _Len, State) ->
{set_ram_duration_target, _Duration} -> 8;
{set_maximum_since_use, _Age} -> 8;
{run_backing_queue, _Mod, _Fun} -> 6;
- {ack, _AckTags, _ChPid} -> consumer_bias(State);
+ {ack, _AckTags, _ChPid} -> 3;
{notify_sent, _ChPid, _Credit} -> consumer_bias(State);
- {resume, _ChPid} -> consumer_bias(State);
+ {resume, _ChPid} -> 2;
_ -> 0
end.