Skip to content

By @noxdafox: Revival of #9620 Pass the message to rabbit_backing_queue:discard callback #13374

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

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

michaelklishin
Copy link
Collaborator

This is #12743 #9620 by @noxdafox rebased and re-submitted by me.

The previous behaviour was passing solely the message ID making
queue implementations such as, for example, the priority one hard
to fulfil.

Signed-off-by: Matteo Cafasso <[email protected]>
(cherry picked from commit 1f7a27c)
Signed-off-by: Matteo Cafasso <[email protected]>
(cherry picked from commit facddb3)
@michaelklishin michaelklishin changed the title Rabbitmq server 12743 By @noxdafox: Revival of #9620 Pass the message to rabbit_backing_queue:discard callback Feb 20, 2025
@michaelklishin michaelklishin added this to the 4.1.0 milestone Feb 20, 2025
@michaelklishin michaelklishin merged commit 789fc64 into main Feb 20, 2025
270 checks passed
@michaelklishin michaelklishin deleted the rabbitmq-server-12743 branch February 20, 2025 02:12
michaelklishin added a commit that referenced this pull request Feb 20, 2025
By @noxdafox: Revival of #9620 Pass the message to rabbit_backing_queue:discard callback  (backport #13374)
@@ -105,7 +105,7 @@

%% Called to inform the BQ about messages which have reached the
%% queue, but are not going to be further passed to BQ.
-callback discard(rabbit_types:msg_id(), pid(), state()) -> state().
-callback discard(rabbit_types:basic_message(), pid(), state()) -> state().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be mc:state() instead of rabbit_types:basic_message()?

Copy link
Collaborator Author

@michaelklishin michaelklishin Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noxdafox can you please see if you can refactor this to mc:state/0 and make it work for the deduplication plugin? rabbit_types:basic_message/0 is AMQP 0-9-1-specific so we'd prefer to use the more generic mc module (which is AMQP 1.0-inspired but works for all protocols).

Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Will submit another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #13382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants