1. Topic Naming Convention
-
Kafka主题可以是任何想要的名字,但尽量遵循命名规约以保持某种一致性;
-
https://cnr.sh/essays/how-paint-bike-shed-kafka-topic-naming-conventions
-
常用结构是分层的,如:<DepartmentName>.<TeamName>.<DatasetName>.<DataFormat>;
-
DataFormat如:.avro,.json,.text,.csv,.log,.protobuf;
-
Kafka主题的有效字符是 ASCII字母数字(alphanumeric),.,_,-;
-
且最好不要混在一起,和 _ 以avoid metric namespace collision(冲突);
org.apache.kafka.common.errors.InvalidTopicException:
Topic 'test.1' collides with existing topics: 'test_1'
主题test.1与现有主题(test_1)冲突