If you have "auto.create.topics.enable" set to "true" (default),
producing to a topic creates it.

Its a bit tricky because the "send" that creates the topic can fail
with "leader not found" or similar issue. retrying few times will
eventually succeed as the topic gets created and the leader gets
elected.

Is it possible that you are not getting errors because you are using
async producer?

Also "no messages are delivered" can have many causes. Check if the
topic exists using:
bin/kafka-topics.sh --list --zookeeper localhost:2181

Perhaps the topic was created and the issue is elsewhere (the consumer
is a usual suspect! perhaps look in the FAQ for tips with that issue)

Gwen

On Fri, Oct 17, 2014 at 12:56 PM, Mohit Anchlia <mohitanch...@gmail.com> wrote:
> Is Kafka supposed to throw exception if topic doesn't exist? It appears
> that there is no exception thrown even though no messages are delivered and
> there are errors logged in Kafka logs.

Reply via email to