kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damian Guy <damian....@gmail.com>
Subject Re: Create Kafka Topic Programatically
Date Wed, 20 Jan 2016 13:22:28 GMT
Hi,

I believe it is a broker property.

It will create the topic with the name you provide.
The topic will not get deleted unless you manually delete it.
It wont get re-created on subsequent calls (unless you've deleted it)

HTH,
Damian

On 20 January 2016 at 13:14, Joe San <codeintheopen@gmail.com> wrote:

> I doubt that might be enough. Could you tell me if the
> auto.create.topics.enable satisfies the following requirement?
>
> 1. I want to create a topic with a specific name
> 2. If I restart the producer client, if the topic with that name already
> exists, it should do nothing and use the topic as is
> 3. Upon producer restart, if the topic already exists, and if the topic has
> un consumed messages, it should not be deleted
>
> Thanks and Regards,
> Joe
>
> On Wed, Jan 20, 2016 at 2:11 PM, Franco Giacosa <fgiacosa@gmail.com>
> wrote:
>
> > Hi Joe,
> >
> > There is an option in the producer called auto.create.topics.enable, so
> the
> > producer can just start sending data to a topic and the topic will be
> > created with the default values.
> >
> >
> >
> > 2016-01-20 13:19 GMT+01:00 Joe San <codeintheopen@gmail.com>:
> >
> > > Kafka Users,
> > >
> > > How can I create a kafka topic programatically?
> > >
> > > I would like to create the topics when I initialize my application. It
> > > should also be in such a way that if the topic already exists, the
> > > initialization code should do nothing!
> > >
> > > Thanks and Regards,
> > > Joe
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message