diff options
| author | Matteo Cafasso <noxdafox@gmail.com> | 2018-11-24 17:16:23 +0200 |
|---|---|---|
| committer | Matteo Cafasso <noxdafox@gmail.com> | 2018-11-24 17:16:23 +0200 |
| commit | eb1b636645bf5a02361ade0821c7c96e77ecf966 (patch) | |
| tree | 2d4a299d1a2a74b106db43d6594753cbecc2e3b4 | |
| parent | 0cc04a1054fdb064bcbfd17c0128728610835392 (diff) | |
| download | rabbitmq-server-git-eb1b636645bf5a02361ade0821c7c96e77ecf966.tar.gz | |
rabbit_mirror_queue_master: is_duplicate drop duplicate messages
Inform the amqqueue process to drop a duplicate message if so.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
| -rw-r--r-- | src/rabbit_mirror_queue_master.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl index a3050c570f..04353423cc 100644 --- a/src/rabbit_mirror_queue_master.erl +++ b/src/rabbit_mirror_queue_master.erl @@ -462,7 +462,7 @@ is_duplicate(Message = #basic_message { id = MsgId }, %% immediately after calling is_duplicate). The msg is %% invalid. We will not see this again, nor will we be %% further involved in confirming this message, so erase. - {true, State #state { seen_status = maps:remove(MsgId, SS) }}; + {{true, drop}, State #state { seen_status = maps:remove(MsgId, SS) }}; {ok, Disposition} when Disposition =:= confirmed %% It got published when we were a slave via gm, and @@ -477,8 +477,8 @@ is_duplicate(Message = #basic_message { id = MsgId }, %% Message was discarded while we were a slave. Confirm now. %% As above, amqqueue_process will have the entry for the %% msg_id_to_channel mapping. - {true, State #state { seen_status = maps:remove(MsgId, SS), - confirmed = [MsgId | Confirmed] }} + {{true, drop}, State #state { seen_status = maps:remove(MsgId, SS), + confirmed = [MsgId | Confirmed] }} end. set_queue_mode(Mode, State = #state { gm = GM, |
