feat: forward broker-specific acknowledgement options - #654
Closed
vvanglro wants to merge 1 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #654 +/- ##
=======================================
Coverage 81.29% 81.30%
=======================================
Files 69 69
Lines 2577 2578 +1
=======================================
+ Hits 2095 2096 +1
Misses 482 482 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The original intention of doing this PR was that when I was making the ack for taskiq-redis-streams , I thought it would be possible to control the granularity of whether to delete this ack message. But just now, while I was taking a shower, I brainstormed and it seems that users don't care about when the messages in the broker are deleted after the task is completed. Therefore, I am closing this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context.ack(**kwargs)to forward broker-specific acknowledgement options to the broker callback.AckControllerandAckableMessagecallback typing for optional keyword options.delete_after_ack=Truethrough a manual acknowledgement.Compatibility
Automatic acknowledgements still invoke callbacks without options. Existing brokers with no-argument acknowledgement callbacks therefore continue to work unchanged unless an application explicitly passes broker-specific options through
Context.ack(...).Taskiq intentionally does not define or interpret any option names; their semantics remain broker-specific.
Validation
Result:
38 passed.