From c9929af18e1d540e6765bf365a2eb7483387a30c Mon Sep 17 00:00:00 2001 From: Michael Meunier Date: Fri, 3 May 2024 11:20:44 +0200 Subject: [PATCH] out_kafka: increase max kafka dynamic topic length to 249 characters This commit increases the max length of kafka dynamic topics. As the limit previously set (64) seemed arbitrary, and kafka allows for a maximum of 249 characters per topic, I think fluentbit should reflect that limit. Signed-off-by: Michael Meunier --- plugins/out_kafka/kafka.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/out_kafka/kafka.c b/plugins/out_kafka/kafka.c index 9379da84724..8dc8cb86ea8 100644 --- a/plugins/out_kafka/kafka.c +++ b/plugins/out_kafka/kafka.c @@ -227,9 +227,9 @@ int produce_message(struct flb_time *tm, msgpack_object *map, flb_warn("',' not allowed in dynamic_kafka topic names"); continue; } - if (val.via.str.size > 64) { - /* Don't allow length of dynamic kafka topics > 64 */ - flb_warn(" dynamic kafka topic length > 64 not allowed"); + if (val.via.str.size > 249) { + /* Don't allow length of dynamic kafka topics > 249 */ + flb_warn(" dynamic kafka topic length > 249 not allowed"); continue; } dynamic_topic = flb_malloc(val.via.str.size + 1);