Skip to content

Commit

Permalink
out_kafka: increase max kafka dynamic topic length to 249 characters
Browse files Browse the repository at this point in the history
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 <mmeunier@skilld.cloud>
  • Loading branch information
mickymiek authored and edsiper committed May 14, 2024
1 parent 2216068 commit abb3b06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/out_kafka/kafka.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit abb3b06

Please sign in to comment.