diff options
author | Emile Joubert <emile@rabbitmq.com> | 2012-12-17 14:05:15 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2012-12-17 14:05:15 +0000 |
commit | 882907e0ec1cc8cbfb11f692a3d79e75133eabd0 (patch) | |
tree | 8c82be9678ac6dfd90394b0b97183e6e10deebe1 | |
parent | 73c50523e13404389fd4b45a326bb8df19c13b7b (diff) | |
download | rabbitmq-server-882907e0ec1cc8cbfb11f692a3d79e75133eabd0.tar.gz |
Dead-letter persistent messages differently
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 922cb6cb..86064141 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -608,10 +608,7 @@ publish_max(#delivery{message = Message, {false, _} -> BQ:publish(Message, Props, Delivered, SenderPid, BQS); {true, true} -> - case rabbit_exchange:lookup(XName) of - {ok, X} -> dead_letter_publish(Message, maxdepth, X, State); - {error, _} -> ok - end, + (dead_letter_fun(maxdepth))([{Message, undefined}]), case Confirm of true -> rabbit_misc:confirm_to_sender(SenderPid, [MsgSeqNo]); false -> ok @@ -857,7 +854,7 @@ cleanup_after_confirm(AckTags, State = #q{delayed_stop = DS, unconfirmed = UC, backing_queue = BQ, backing_queue_state = BQS}) -> - {_Guids, BQS1} = BQ:ack(AckTags, BQS), + {_Guids, BQS1} = BQ:ack([Ack || Ack <- AckTags, Ack /= undefined], BQS), State1 = State#q{backing_queue_state = BQS1}, case dtree:is_empty(UC) andalso DS =/= undefined of true -> case DS of |