Skip to content

UnrecognizedBrokerVersion: api_version (3, 2, 3) not found in kafka.protocol.broker_api_versions #2566

Closed
@millerdev

Description

@millerdev

We are seeing a regression when upgrading from kafka-python 1.4.7 to 2.1.2:

Traceback (most recent call last):
  ...
  File ".../python3.9/site-packages/kafka/conn.py", line 436, in connect
    if self._try_api_versions_check():
  File ".../python3.9/site-packages/kafka/conn.py", line 536, in _try_api_versions_check
    raise Errors.UnrecognizedBrokerVersion('api_version %s not found in kafka.protocol.broker_api_versions' % (self._api_version,))
kafka.errors.UnrecognizedBrokerVersion: UnrecognizedBrokerVersion: api_version (3, 2, 3) not found in kafka.protocol.broker_api_versions

The issue can be worked around by specifying a two-tuple (3, 2) rather than a three-tuple for api_version. However, this breaking change does not appear to be documented in the change logs for 2.0.x or 2.1.x. Since the library previously accepted a three-tuple for api_version, it seems like it should continue to work without modifications to client code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions