Native Delayed Delivery in RabbitMQ#9207
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9207 +/- ##
=======================================
Coverage 78.15% 78.15%
=======================================
Files 151 153 +2
Lines 18984 19020 +36
Branches 2508 2516 +8
=======================================
+ Hits 14837 14866 +29
- Misses 3860 3866 +6
- Partials 287 288 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@Nusnus Any idea why the quorum queues smoke tests are failing because the RabbitMQ container is not ready yet? |
Does it pass locally? |
No it does not. I haven't done anything that can destabilize the test suite so I'm not sure what could be wrong. |
0ae3885 to
7af9d39
Compare
Nusnus
left a comment
There was a problem hiding this comment.
Optional comment: Add assertion error messages.
The only reason I bring this up is due to the nature of this change, which is relying on an algorithm to implement an ETA mechanism, so these errors could be crucial, and as the author of the changes, you will probably come up with the best error messages as you understand the protocol.
Food for thought.
Except that, please see my other comments. Something needs fixing too.
|
Also please make sure the CI fully passes 🙏 |
|
CI fails because I'm installing Kombu from Git. @Nusnus Once you release Kombu's RC I can change the requirements to that RC. |
Nusnus
left a comment
There was a problem hiding this comment.
CI fails because I'm installing Kombu from Git. @Nusnus Once you release Kombu's RC I can change the requirements to that RC.
Done. Please rebase on main.
The requirements are already updated.
Ping me if the CI fully passes for a review.
There have been many changes since my last review.
I'll do it today if the CI is green of course.
|
@Nusnus Ping. |
Nusnus
left a comment
There was a problem hiding this comment.
I have done a deep dive into the PR and found some issues.
I found at least 1 bug, some missing doc, cosmetic issues and some questions to make sure I fully understand the code, and some more minor stuff..
@thedrow please review my comments carefully and feel free to ask for clarifications.
I want this finished fast so we can include it in the next RC for Celery, so I’ll give you top priority after everything is fixed/answered.
Lastly, please do not dismiss/resolve my comments and let me review your response/fix to make sure there aren’t any gaps by resolving my own PR comments. We, the maintainers, need to show an example of work methodologies for the rest of the community, so I kindly ask you to join me in maintaining high standards.
Thanks!
|
Out of curiosity, what are the benefit of the NServiceBus implementation versus using per-message TTL by specifying the |
Nusnus
left a comment
There was a problem hiding this comment.
CI fails because I'm installing Kombu from Git. @Nusnus Once you release Kombu's RC I can change the requirements to that RC.
Please take note the new Kombu RC release, which is a requirement for this PR, has introduced a new breaking bug as described in celery/kombu#2157.
Obviously, we do not want to revert any changes, but if we merge this PR without fixing Kombu (first IMHO), then we’ll introduce a dependency in Celery v5.5 to a confirmed broken (RC) version of Kombu.
Please review the Kombu’s report by @woutdenolf in addition to the PR comments from yesterday, as per my explanation above, it is closely related.
I haven't considered other implementations. This just works so there's no need to find other solutions. |
Nusnus
left a comment
There was a problem hiding this comment.
Replied to what was answered so far.
Please review my new comments and the rest of yesterday's comments, which are still awaiting your response/fix.
Ping me when you’re done.
P.S
Merge/Rebase on main to make sure you’re up to date.
This reverts commit ce31560.

Note: Before submitting this pull request, please review our contributing
guidelines.
Description
Fixes #9149.
Since ETA tasks will block the worker when using quorum queues we had to provide an alternative solution that will support ETA tasks on RabbitMQ.
This PR provides a solution based on NServiceBus' implementation of native delayed delivery.
The solution is based on a series of exchanges and queues as detailed in NServiceBus' documentation.
To use this feature you need to enable the
broker_native_delayed_deliveryconfiguration setting when using quorum queues.