-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Kafka versions #133
Kafka versions #133
Conversation
…o select Kafka version with appropriate defaults for core consumers and producers
…o select Kafka version with appropriate defaults for core consumers and producers
… into kafka_versions
The problem here is that we would have to add consumer classes for every kafka release. I prefer documenting which server versions are supported and handling any unrecognized api requests by raising an error that says "This API request was not recognized by the server" |
And of course setting the defaults to something that reduces errors and confusion |
Ideally, we can determine the Kafka server version and ignore certain features, like auto-commit. In the future there will be a Kafka API for getting the server version, but until then we have to simply fail with a good error message like @rdiomar suggest. |
There are two advantages to this approach:
Also, failing with a good error message is not very "batteries included" when you can support multiple versions of Kafka seamlessly. |
"And of course setting the defaults to something that reduces errors and confusion" I would argue that we should set the defaults to what should be considered "expected behavior". With the introduction of autocommit, it should be expected behavior that it be the default. Basically we are looking at a situation where the expected defaults will change over time in potentially non-backward compatible ways. There are several ways to go about solving this problem:
The approach represented in this patch is a variant on option 2, by requiring the user to specify the Kafka version (or use the latest). This approach seems the safest and most extensible for dealing with a live project with ongoing changes. |
Conflicts: example.py
Conflicts: example.py
Conflicts: servers/0.8.0/kafka-src
Co-authored-by: Dave Voutila <voutilad@gmail.com>
Co-authored-by: Dave Voutila <voutilad@gmail.com>
This commit is a suggested fix for Issue #118, as well as other Kafka server version related issues. The approach here is to move the responsibility for knowing what Kafka server version is being used to the user and to provide reasonable and sane defaults for that particular Kafka server version.