Skip to content

check_version() fails on Azure Event Hubs since 2.1.3 #2602

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

Closed
ethiebautgeorge-nasuni opened this issue Apr 29, 2025 · 2 comments · Fixed by #2603
Closed

check_version() fails on Azure Event Hubs since 2.1.3 #2602

ethiebautgeorge-nasuni opened this issue Apr 29, 2025 · 2 comments · Fixed by #2603

Comments

@ethiebautgeorge-nasuni
Copy link

Versions since 2.1.3 do not work with Azure Event Hubs any longer.

This is because of this commit: https://github.com/dpkp/kafka-python/pull/2558/files

Issue is with self._api_versions_idx = 4

Setting this to 2 (as it previously was) fixes the problem.

It looks like Azure Event Hubs automatically breaks the connection as soon as it receives a payload with this version.

Suggestion: Add some configuration parameter to set the default _api_versions_idx

@dpkp
Copy link
Owner

dpkp commented Apr 29, 2025

You should be able to work around this problem by passing an explicit api_version to your producer/consumer instances.

@dpkp dpkp changed the title Versions since 2.1.3 do not work with Azure Event Hubs any longer check_version() fails on Azure Event Hubs since 2.1.3 Apr 29, 2025
@ethiebautgeorge-nasuni
Copy link
Author

Wow thanks @dpkp ! That was quick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants