What is the bestway to create topics in kafka?
In the new producer API, when i try
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.