From e28772cbe56e7cb6703c02aa0526db6b15be924d Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Fri, 29 Sep 2023 04:12:30 +0530 Subject: [PATCH] Increased flexver request size for Metadata request to include topic_id size --- src/rdkafka_request.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rdkafka_request.c b/src/rdkafka_request.c index c1a650d984..de44677885 100644 --- a/src/rdkafka_request.c +++ b/src/rdkafka_request.c @@ -2231,9 +2231,11 @@ rd_kafka_MetadataRequest0(rd_kafka_broker_t *rkb, ApiVersion = rd_kafka_broker_ApiVersion_supported( rkb, RD_KAFKAP_Metadata, 0, metadata_max_version, &features); - rkbuf = rd_kafka_buf_new_flexver_request(rkb, RD_KAFKAP_Metadata, 1, - 4 + (50 * topic_cnt) + 1, - ApiVersion >= 9); + rkbuf = rd_kafka_buf_new_flexver_request( + rkb, RD_KAFKAP_Metadata, 1, + 4 + (66 /* 50 for topic name and 16 for topic id */ * topic_cnt) + + 1, + ApiVersion >= 9); if (!reason) reason = "";