summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-08-04 12:27:50 +0100
committerMatthew Sackman <matthew@lshift.net>2009-08-04 12:27:50 +0100
commitf6ba7424720d36173cccaa72d7e361faefe4df38 (patch)
tree1e5591165830e946930179bd0fe729b4958b877c
parent609d920378d573c2870fe67bf283b7dc1df44af6 (diff)
downloadrabbitmq-server-bug21046.tar.gz
Done. Testing the latency between the call to conserve_memory and when the msg gets processed shows this is benficial:bug21046
In the erlang client, hammer in a few million messages, with no consumer. This causes the channel mailbox to get pretty big. Without the higher priority can demonstrate a delay of over a second before the conserve_message gets processed. With this, it's a mere fraction of that.
-rw-r--r--src/rabbit_channel.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 3089bb62..87664de3 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -89,7 +89,7 @@ deliver(Pid, ConsumerTag, AckRequired, Msg) ->
gen_server2:cast(Pid, {deliver, ConsumerTag, AckRequired, Msg}).
conserve_memory(Pid, Conserve) ->
- gen_server2:cast(Pid, {conserve_memory, Conserve}).
+ gen_server2:pcast(Pid, 9, {conserve_memory, Conserve}).
%%---------------------------------------------------------------------------