Apache Kafka主题名称有哪些限制? [英] What are Apache Kafka topic name limitations?

查看:58
本文介绍了Apache Kafka主题名称有哪些限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试创建一个Kafka主题"user:created" ,并在Kafka日志中看到此错误:属性值部分的无效字符':'.我在Google上搜索后发现,人们在谈论也在弃用. _ 符号.

I have just tried creating a Kafka topic "user:created" and saw this error in Kafka logs: Invalid character ':' in value part of property. I googled and found that in a mailing list people are talking about deprecating . and _ symbols too.

Apache Kafka主题名称中不能使用哪些符号?

Which symbols can't be used in Apache Kafka topic names?

推荐答案

根据因此,最大长度为255个符号和字母,可以使用.(点), _ (下划线),-(减号)用过

So, max length is 255 symbols and letters, . (dot), _ (underscore), - (minus) can use used

在Kafka 0.10中,maxNameLength从255更改为249.请参见提交

In the Kafka 0.10 the maxNameLength was changed from 255 to 249. See commit

周期为.或下划线 _ 的主题也可能在内部数据结构中发生冲突,因此建议您同时使用其中一种,但不要同时使用两者().

Also topics with a period . or underscore _ could collide in internal data structures, so you are advised to use either but not both (source).

这篇关于Apache Kafka主题名称有哪些限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆