What is the bestway to create topics in kafka?
In the new producer API, when i try
The basic level of parallelism in Kafka is the partition. On both the producer and the broker side, writes to different partitions can be done fully in parallel.
Things to keep in mind
As a rule of thumb, it’s probably a good idea to limit the number of partitions per broker to 100 x b x r
,
where b
is the number of brokers and r
is the replication factor.
For example: If you have 9 brokers/nodes in your cluster your topic could have
EDIT: See the article How to choose the number of topics/partitions in a Kafka cluster? for further details (answer has been taken from there)