-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Invalid documentation for NewHashPartitioner #717
Labels
Comments
It actually returns -1 and the encoding error, so the producer should just pass along the encoding error rather than trying to treat the -1 as a partition (https://github.com/Shopify/sarama/blob/9bb4a68d57ff6f623363aa172f0a8297aa289ba7/async_producer.go#L346-L349). The behaviour makes sense as-is, I will fix the documentation. Thanks for the report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sarama Version: v1.10
https://godoc.org/gopkg.in/Shopify/sarama.v1#NewHashPartitioner says:
But code actually returns -1 in case of encoding error, which results in
ErrInvalidPartition
.The text was updated successfully, but these errors were encountered: