Closed
Description
Currently I see some places like this in code:
if self.config['api_version'] >= (0, 10):
version = 2
elif self.config['api_version'] == (0, 9):
version = 1
else:
version = 0
As of 0.10 this is not quite right, as we have a proper API for Version checking and should use that. I do understand, that Java driver still did not deliver it (KAFKA-3600), but setting up a checker is not that hard to do, and it's still better, than api_version checking.
For example if instead of the check above we could write:
fetch_version = self._client.best_supported_version(FetchRequest)
Any thoughts?
The main issue is probably that we have to do the Version check's asynchronously, but I think I will manage to get over it. I can do a PR if we agree on the need and a bit on API.
Metadata
Metadata
Assignees
Labels
No labels