What should be naming convention of topic and part

2019-07-13 11:38发布

Here are some example I was trying to use for kafka,

I am not sure it is good to go with or any specific naming convention?

For Topic

  1. {name}_queue
  2. {name}_topic
  • Here I think first option is not good because Topic is not queue exactly.
  • In the term of Computer Science Queue means First Come First Out.
  • If partitions come into the picture in topic than Topic will be no longer queue because inside the topic partitions is part of queue and data comes from For Partitions
  1. {name}_partition
  2. {name}_{kafka topic name}_partition
  3. {name}_{kafka topic name}_part

2条回答
贼婆χ
2楼-- · 2019-07-13 12:18

There is no much written related to Kafka topics naming convention, but this may give you some guidance

查看更多
何必那么认真
3楼-- · 2019-07-13 12:25

I think you're overthinking this. All you need to do is to assign a Kafka topic name that adheres to [a-zA-Z0-9\\._\\-]. So like-this or like_this or likeThis or even likethis. Kafka will handle partition names for you by adding topic-name-{partitionid} for each partition.

查看更多
登录 后发表回答