Skip to content

Features are disabled when broker increases minimum RPC versions #4948

@emasab

Description

@emasab

Description

with KIP-896: it's planned that older
RPC versions. When connecting to such broker, librdkafka deactivates most features because the maximum version is almost always the same as the minimum version and corresponds to a version being removed.

How to reproduce

In rd_kafka_broker_set_api_versions can be overridden this way:

        size_t i;
        for (i = 0; i < api_cnt; i++) {
                if (apis[i].ApiKey == RD_KAFKAP_Produce)
                        apis[i].MinVer = 8;
                if (apis[i].ApiKey == RD_KAFKAP_ApiVersion)
                        apis[i].MinVer = 2;
                if (apis[i].ApiKey == RD_KAFKAP_FindCoordinator)
                        apis[i].MinVer = 1;
                if (apis[i].ApiKey == RD_KAFKAP_JoinGroup) {
                        apis[i].MinVer = -2;
                        apis[i].MaxVer = -2;
                }
                if (apis[i].ApiKey == RD_KAFKAP_SaslHandshake)
                        apis[i].MinVer = 2;
                if (apis[i].ApiKey == RD_KAFKAP_InitProducerId)
                        apis[i].MinVer = 1;
                if (apis[i].ApiKey == RD_KAFKAP_ListOffsets)
                        apis[i].MinVer = 1;
        }

It happens that all features are disabled.
test_minver_increased.log

Minimum required MinVer values are currently:

Produce 3
Fetch 4
ApiVersion 0
FindCoordinator 0
OffsetCommit 2
OffsetFetch 1
JoinGroup 0
SyncGroup 0
Heartbeat 0
LeaveGroup 0
SaslHandshake 0
ListOffsets 1
InitProducerId 0
SaslAuthenticate 1

by comparing it to KIP 896 removed versions (non-baseline), all versions described in the KIP can be removed. Removing JoinGroup v0 will disable the broker feature RD_KAFKA_FEATURE_BROKER_BALANCED_CONSUMER that isn't used internally and not exposed in the public API.

Checklist

Please provide the following information:

  • librdkafka version (release number or git tag): v1.x+ up to latest
  • Apache Kafka version: <REPLACE with e.g., 0.10.2.3>
  • librdkafka client configuration: any
  • Operating system: any
  • Provide logs (with debug=.. as necessary) from librdkafka
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions