Skip to content
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 distribution strategy from partition key #491

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

joelfoliveira
Copy link
Contributor

@joelfoliveira joelfoliveira commented Dec 7, 2023

Description

The default worker distribution strategy uses the message key to distribute messages to consumers.

While the message key is the default partition strategy, it is not guaranteed the producer is using that strategy and can have implications in guaranteeing the message order when consuming messages.

This PR adds a new worker distribution strategy based on the partition key instead which better guarantees the message order.

Fixes #490 #440

How Has This Been Tested?

Unit tests were added

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have made corresponding changes to the documentation

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

@joelfoliveira joelfoliveira force-pushed the feat/add-partitionkey-worker-strategy branch from 16e9961 to df88731 Compare December 12, 2023 12:17
@joelfoliveira joelfoliveira force-pushed the feat/add-partitionkey-worker-strategy branch from df88731 to ba56385 Compare December 12, 2023 12:30
@joelfoliveira joelfoliveira changed the title Add distribution strategy from partition key as default Add distribution strategy from partition key Dec 12, 2023
@joelfoliveira joelfoliveira force-pushed the feat/add-partitionkey-worker-strategy branch from ba56385 to 1087f5f Compare December 12, 2023 12:33
@joelfoliveira joelfoliveira force-pushed the feat/add-partitionkey-worker-strategy branch from 1087f5f to 31c3a02 Compare December 12, 2023 14:01
@joelfoliveira joelfoliveira force-pushed the feat/add-partitionkey-worker-strategy branch from 31c3a02 to f024388 Compare December 12, 2023 14:05
@joelfoliveira joelfoliveira merged commit 6ac5df6 into master Dec 18, 2023
3 checks passed
@joelfoliveira joelfoliveira deleted the feat/add-partitionkey-worker-strategy branch December 18, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report]: Distribution strategy by message/partition key issue.
4 participants