-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add max_attempts_at_message #395
base: master
Are you sure you want to change the base?
Add max_attempts_at_message #395
Conversation
1a432e5
to
1adb5a5
Compare
1adb5a5
to
0737287
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #395 +/- ##
==========================================
+ Coverage 77.51% 77.65% +0.14%
==========================================
Files 62 62
Lines 1899 1911 +12
==========================================
+ Hits 1472 1484 +12
Misses 427 427 ☔ View full report in Codecov by Sentry. |
I don't think this PR should be implemented this way and affect base classes such as AckableMessage. Also in here I don't see anywhere how you set this redeliver information to a message. If you expect brokers to do it, then I refuse to merge it, because Broker API should remain simple to implement. I think that it will be much easier for you to implement such functionality as a middleware and add it in taskiq.middlewares. |
Thanks for the reply.
As my issue explains, RabbitMQ does this by itself: if a message that was delivered isn't acked but the connection with the consuming client closes, RabbitMQ requeues the message to the front of the queue and sets a
The issue currently is that message headers, including the one talked about above, aren't being passed to the message the receiver works with. They need to be put somewhere, either into the
The middleware would still need access to the message headers. It would also need access to the message's ack callback, and the Also bear in mind there is a separate PR on the taskiq-aio-pika side that deals with RabbitMQ's settings and propagating the header: taskiq-python/taskiq-aio-pika/pull/37. |
caca82c
to
25ec684
Compare
25ec684
to
82df4b4
Compare
This addresses the issue taskiq-python/taskiq-aio-pika#35.