You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Ali Akhtar <al...@gmail.com> on 2016/09/15 06:16:40 UTC

Topics being automatically deleted?

I've noticed that, on my own machine, if I start a kafka broker, then
create a topic, then I stop that server and restart it, the topic I created
is still kept.

However, on restarts, it looks like the topic is deleted.

Its also possible that the default retention policy of 24 hours causes the
messages to be deleted.

However, even if the messages are deleted, shouldn't the topic itself be
preserved?

What would happen if there are no new messages posted to a topic for a
week, but I still have consumers listening to that topic? If the topic is
deleted, will I need to restart my consumer? This seems like a pain.

Re: Topics being automatically deleted?

Posted by Ali Akhtar <al...@gmail.com>.
Thanks, yeah, that must be it. So topics don't get deleted if all messages
in them expire, right?

Good to know :)

On Thu, Sep 15, 2016 at 11:29 AM, Manikumar Reddy <manikumar.reddy@gmail.com
> wrote:

> looks like you have not changed the default data log directory. By default
> kafka is configured to store the data logs to /tmp/ folder. /tmp gets
> cleared
> on system reboots. change log.dirs config property to some other directory.
>
> On Thu, Sep 15, 2016 at 11:46 AM, Ali Akhtar <al...@gmail.com> wrote:
>
> > I've noticed that, on my own machine, if I start a kafka broker, then
> > create a topic, then I stop that server and restart it, the topic I
> created
> > is still kept.
> >
> > However, on restarts, it looks like the topic is deleted.
> >
> > Its also possible that the default retention policy of 24 hours causes
> the
> > messages to be deleted.
> >
> > However, even if the messages are deleted, shouldn't the topic itself be
> > preserved?
> >
> > What would happen if there are no new messages posted to a topic for a
> > week, but I still have consumers listening to that topic? If the topic is
> > deleted, will I need to restart my consumer? This seems like a pain.
> >
>

Re: Topics being automatically deleted?

Posted by Manikumar Reddy <ma...@gmail.com>.
looks like you have not changed the default data log directory. By default
kafka is configured to store the data logs to /tmp/ folder. /tmp gets
cleared
on system reboots. change log.dirs config property to some other directory.

On Thu, Sep 15, 2016 at 11:46 AM, Ali Akhtar <al...@gmail.com> wrote:

> I've noticed that, on my own machine, if I start a kafka broker, then
> create a topic, then I stop that server and restart it, the topic I created
> is still kept.
>
> However, on restarts, it looks like the topic is deleted.
>
> Its also possible that the default retention policy of 24 hours causes the
> messages to be deleted.
>
> However, even if the messages are deleted, shouldn't the topic itself be
> preserved?
>
> What would happen if there are no new messages posted to a topic for a
> week, but I still have consumers listening to that topic? If the topic is
> deleted, will I need to restart my consumer? This seems like a pain.
>