-
Notifications
You must be signed in to change notification settings - Fork 3.9k
RFC rabbit_amqqueue_process: improve message duplicates handling #1774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `is_duplicate` callback can signal the amqqueue process that the message is a duplicate and suggests whether to just ignore it or to reject it. This enables the `rabbit_backing_queue` implementations to notify a publisher that the message is deemed a duplicate. Signed-off-by: Matteo Cafasso <[email protected]>
Inform the amqqueue process to drop a duplicate message if so. Signed-off-by: Matteo Cafasso <[email protected]>
This looks good after a quick review. Have you done any long-running benchmark to assess the impact of this, in particular on priority queues? Your changes seem roughly equivalent but this is a pretty sensitive code path. Thank you for your ongoing contributions! |
Valid point. I will try some long running tests with HA and priority queues enabled. We'll also need to change the management console message as now states: "rejected Unable to publish message. Check queue limits." Now there are more cases where a message might not reach the queue than a mere queue overflow. |
I'm not sure what message that is but it can be discussed in a separate management plugin PR. |
Got time to run some tests. Successfully ran several rounds with the following set up.
I did not encounter any issue. All queues were constantly empty and broker messages per second kept between 2.5K to 3K. I also run several tests with the above set up and the message deduplication plugin enabled to test the rejection flow. Did not observe any issue, performance close to the above mentioned. Messages were de-duplicated correctly. Any other scenario you think I should test? |
@noxdafox thank you, that sounds like a good start. I will QA this and then test a few workflows we use on our team. |
As discussed in #1741, this patch series take into use the newly defined
is_duplicate
behaviour in rabbitmq/rabbitmq-common#283.Conversely to #1741, this series should not be changing the original behaviour but rather extending it.
If the message is duplicated due to an internal error, the backing queue detecting it can instruct the amqqueue process to simply ignore it.
If the message is instead deemed a duplicate, the publisher will be notified with a rejection.
Types of Changes
Checklist
CONTRIBUTING.md
documentNote on tests:
There were few tests failing with the latest changes in master in the
cluster_rename_SUITE
test suite. This patch series did not cause any new test to fail.