diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-03-02 13:32:59 +0000 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-03-02 13:32:59 +0000 |
commit | 75b306010463265a291e84d91f9e13ebbd470714 (patch) | |
tree | 0b7417ed51316f069ceda5f9771fea5a825c50cf /src/rabbit_variable_queue.erl | |
parent | 99c370c70001bee20f2cc5144321bac86e7924eb (diff) | |
download | rabbitmq-server-75b306010463265a291e84d91f9e13ebbd470714.tar.gz |
only confirm delivered messages that need confirming
Diffstat (limited to 'src/rabbit_variable_queue.erl')
-rw-r--r-- | src/rabbit_variable_queue.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index d1307b85..d0c984cb 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -510,8 +510,13 @@ publish(Msg, MsgProps, State) -> a(reduce_memory_use(State1)). publish_delivered(false, #basic_message { guid = Guid }, - _MsgProps, State = #vqstate { len = 0 }) -> - blind_confirm(self(), gb_sets:singleton(Guid)), + MsgProps = #message_properties { + needs_confirming = NeedsConfirming }, + State = #vqstate { len = 0 }) -> + case NeedsConfirming of + true -> blind_confirm(self(), gb_sets:singleton(Guid)); + false -> ok + end, {undefined, a(State)}; publish_delivered(true, Msg = #basic_message { is_persistent = IsPersistent, guid = Guid }, |