feat(python): support message partitioning strategies - #3927
Open
jiengup wants to merge 1 commit into
Open
Conversation
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
2 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3927 +/- ##
=========================================
Coverage 83.76% 83.76%
Complexity 1358 1358
=========================================
Files 1212 1213 +1
Lines 166189 166215 +26
Branches 133663 133663
=========================================
+ Hits 139210 139236 +26
Misses 23342 23342
Partials 3637 3637
🚀 New features to boost your workflow:
|
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.
Which issue does this PR address?
Closes #3896
Rationale
The Python SDK only supported sending messages to an explicit partition, while the Rust SDK also supports balanced and message-key partitioning.
What changed?
IggyClient.send_messages()now accepts a PythonPartitioningobject supporting fixed, balanced, and message-key routing. Existing integer partition IDs remain fully compatible, while string message keys are encoded as UTF-8 and validated against the 1–255 byte limit.Type stubs, tests, and a runnable Python example covering all three strategies are included.
Local Execution
foreign/python/tests/test_message_operations.pyAI Usage