From 407616126107a53fca99d8c6e89458826745d232 Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Mon, 14 Oct 2024 14:29:39 +0200 Subject: [PATCH 1/2] Fix for a Fetch regression when connecting to Apache Kafka < 2.7 AK 2.7 is the first version implementing Fetch 12, before that it shouldn't fallback to v12, neither check if topic IDs are supported. --- CHANGELOG.md | 18 ++++++++++++++++++ src/rdkafka_fetcher.c | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b43973b..71c7e9133 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# librdkafka v2.6.1 + +librdkafka v2.6.1 is a maintenance release: + + * Fix for a Fetch regression when connecting to Apache Kafka < 2.7 (#). + + +## Fixes + +### Consumer fixes + + * Issues: #4870 + Fix for a Fetch regression when connecting to Apache Kafka < 2.7, causing + fetches to fail. + Happening since v2.6.0 (#) + + + # librdkafka v2.6.0 librdkafka v2.6.0 is a feature release: diff --git a/src/rdkafka_fetcher.c b/src/rdkafka_fetcher.c index 835271a4b..24112f4c1 100644 --- a/src/rdkafka_fetcher.c +++ b/src/rdkafka_fetcher.c @@ -996,8 +996,8 @@ int rd_kafka_broker_fetch_toppars(rd_kafka_broker_t *rkb, rd_ts_t now) { /* Fallback to version 12 if topic id is null which can happen if * inter.broker.protocol.version is < 2.8 */ - ApiVersion = - ApiVersion > 12 && can_use_topic_ids(rkb) ? ApiVersion : 12; + if (ApiVersion > 12 && !can_use_topic_ids(rkb)) + ApiVersion = 12; rkbuf = rd_kafka_buf_new_flexver_request( rkb, RD_KAFKAP_Fetch, 1, From 2aa845c504657efcec5ee5e85e96dfec7686c858 Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Mon, 14 Oct 2024 14:33:01 +0200 Subject: [PATCH 2/2] PR number --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c7e9133..7cf8a2e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ librdkafka v2.6.1 is a maintenance release: - * Fix for a Fetch regression when connecting to Apache Kafka < 2.7 (#). + * Fix for a Fetch regression when connecting to Apache Kafka < 2.7 (#4871). ## Fixes @@ -12,7 +12,7 @@ librdkafka v2.6.1 is a maintenance release: * Issues: #4870 Fix for a Fetch regression when connecting to Apache Kafka < 2.7, causing fetches to fail. - Happening since v2.6.0 (#) + Happening since v2.6.0 (#4871)