Secrets of Kafka console producers

Do Kafka console producers can also create topics? Tricky Interview Ques.

Yes, it is possible to create a topic using console producer. But this is really a bad idea to create a topic. Read the blog below for details.

Sagar Kudu
2 min readApr 15, 2021


Do Kafka console producers can also create topics?

— Yes, it is possible but not a good idea to create a topic in this way. --bootstrap-server --topic new_topic

But basically this new_topic does not exist, it is not yet created in Kafka, and what will happen if we send the message?

We have got the warning stating that the Leader is not available. This doesn’t work, so let’s try one more time.

This is the issue in Kafka.

Earlier there was no leader available but the Producers are able to recover from the errors. So it just tried and waited until the leader was available and then produced the message.

Checking the list of topics now. --zookeeper --list

Is it a good idea to create topics in this way?

No, really it is very bad to create a topic in this way, the problem is we get only one partition count and only one replication factor. --zookeeper --topic new_topic --describe

Learn how can you create a Topic…

Next →



Sagar Kudu

I am Full Stack Java Developer @ Tata Strive | Get blogs and tutorials related to the (React | Kafka | DevOps) | Connect