rabbit_backing_queue: extend is_duplicate callback return values
Allow the backing queue implementation to inform the amqqueue process
how to proceed when a message duplicate is encountered.
* {true, drop} the message is a duplicate and should be ignored
* {true, reject} the message is a duplicate and the publisher should
receive a rejection
* false the message is not deemed a duplicate
* true kept for backward compatibility, equivalent to {true, drop}
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
This commit is contained in:
parent
8557cb990c
commit
7cfb017889
|
|
@ -255,9 +255,9 @@
|
|||
|
||||
%% Called prior to a publish or publish_delivered call. Allows the BQ
|
||||
%% to signal that it's already seen this message, (e.g. it was published
|
||||
%% or discarded previously) and thus the message should be dropped.
|
||||
%% or discarded previously) specifying whether to drop the message or reject it.
|
||||
-callback is_duplicate(rabbit_types:basic_message(), state())
|
||||
-> {boolean(), state()}.
|
||||
-> {{true, drop} | {true, reject} | boolean(), state()}.
|
||||
|
||||
-callback set_queue_mode(queue_mode(), state()) -> state().
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue