Skip to content

Commit

Permalink
Fix for a Fetch regression when connecting to Apache Kafka < 2.7 (#4871)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emasab authored Oct 16, 2024
1 parent 7fc5a59 commit c23b2a6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 (#4871).


## 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 (#4871)



# librdkafka v2.6.0

librdkafka v2.6.0 is a feature release:
Expand Down
4 changes: 2 additions & 2 deletions src/rdkafka_fetcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c23b2a6

Please sign in to comment.