How to create topics in apache kafka?

前端 未结 6 1145
-上瘾入骨i
-上瘾入骨i 2021-01-31 17:09

What is the bestway to create topics in kafka?

  • How many replicas/partitions to be defined when we create topics?

In the new producer API, when i try

6条回答
  •  北海茫月
    2021-01-31 17:49

    set the property auto.create.topics.enable=true in your server.properties file, if you have multiple brokers do thee same for all the server*.properties file and restart your kafka-server. But make sure you set the partitions for an appropriate number in the server*.properties num.partitions=int, otherwise there will be a performance issue if you increase the partitions later.

提交回复
热议问题