-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Tolerate misbehaving 3rd party kafka clients with wrong member metadata #493
Comments
I'll add a workaround that, if the first two bytes are {0, 1} and the decoding fails, retries as v0. I'll leave this workaround only for v1 at the moment -- hopefully clients don't claim higher and higher support without actually supporting the higher protocol fields. |
Specifically this commit, if you want to give it a shot: 2572b9a |
Great, thanks for the fast response |
I tried 1.14.1 on a migration from segmentio/kafka-go and now it works smoothly. Thanks for the resolution. |
I test migration from segmentio/kafka-go to franz-go and I met errors like next one when deploy franz-go version application over kafka-go version:
join and sync loop errored%!(EXTRA string=group, string=results, string=err, *errors.errorString=unable to create group member balancer: unable to read member metadata: response did not contain enough data to be valid, string=consecutive_errors, int=1, string=backoff, time.Duration=253.795577ms)
If I am not mistaken, there is a misbehavior in kafka-go segmentio/kafka-go#1156, which sends member metadata v1 version without OwnedPartitions that doesn't comply Kafka Protocol. When decoding metadata, franz-go expects OwnedPartitions must be provided and return the error https://github.com/twmb/franz-go/blob/master/pkg/kmsg/generated.go#L1653
My suggestion is to provide soft handling like sarama does here https://github.com/Shopify/sarama/blob/main/consumer_group_members.go#L43 . It will help to migrate from another kafka clients to franz-go smoothly.
Kafka Version
2.6.0.0
franz-go
v1.13.4
The text was updated successfully, but these errors were encountered: