You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Raghav <ra...@gmail.com> on 2016/11/17 16:58:30 UTC
get topics or create topics
Hi
I want to be able to create a topic, if it doesn't exist already ? Is this
going to be a two step process of first getting list of topics, and then
creating one if it doesn't exist ?
Is there an api which takes a topic name and created only if it's not
present ? I am doing this stuff in Java.
What are the right APIs for these operations ?
Thanks.
--
Raghav
Re: get topics or create topics
Posted by Radoslaw Gruchalski <ra...@gruchalski.com>.
Hi Raghav,
Have a look at AdminUtils:
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/AdminUtils.scala
–
Best regards,
Radek Gruchalski
radek@gruchalski.com
On November 17, 2016 at 5:58:34 PM, Raghav (raghavastic@gmail.com) wrote:
Hi
I want to be able to create a topic, if it doesn't exist already ? Is this
going to be a two step process of first getting list of topics, and then
creating one if it doesn't exist ?
Is there an api which takes a topic name and created only if it's not
present ? I am doing this stuff in Java.
What are the right APIs for these operations ?
Thanks.
--
Raghav