You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Johannes Nachtwey <jo...@gmail.com> on 2016/06/01 08:21:23 UTC

Change Topic Name

Hi guys,

it´s possible to change an existing topic name?

Thanks and best wishes
Johannes

Re: Change Topic Name

Posted by Todd Palino <tp...@gmail.com>.
With the caveat that I’ve never tried this before...

I don’t see a reason why this wouldn’t work. There’s no topic information
that’s encoded in the log segments, as far as I’m aware. And there’s no
information about offsets stored in Zookeeper. So in theory, you should be
able to shut down the entire Kafka cluster (this will require a full
shutdown), and copy the log segments from one directory to another.
Obviously, the partition to broker assignments may not be the same, so
you’ll either need to align them with a partition reassignment beforehand,
or make sure you put the right partitions on the right brokers.

-Todd


On Wed, Jun 1, 2016 at 12:02 PM, Vladimir Picka <os...@gmail.com>
wrote:

> Does creating new topic with new name and the same settings as the
> original one and directly copying files from kafka log directory into the
> new topic folder work? It would be nice if it would. I don't know if there
> is anything in log file format info or Zoo info attached to original topic
> which would prevent it to work.
>
> Petr
>
> -----Original Message-----
> From: Todd Palino [mailto:tpalino@gmail.com]
> Sent: 1. června 2016 10:48
> To: users@kafka.apache.org
> Subject: Re: Change Topic Name
>
> There's no way to do that. If you're trying to maintain data, you'll need
> to read all the data from the existing topic and produce it to the new one.
>
> -Todd
>
> On Wednesday, June 1, 2016, Johannes Nachtwey <
> johannes.nachtweyatwork@gmail.com> wrote:
>
> > Hi guys,
> >
> > it´s possible to change an existing topic name?
> >
> > Thanks and best wishes
> > Johannes
> >
>
>
> --
> *Todd Palino*
> Staff Site Reliability Engineer
> Data Infrastructure Streaming
>
>
>
> linkedin.com/in/toddpalino
>
>


-- 
*Todd Palino*
Staff Site Reliability Engineer
Data Infrastructure Streaming



linkedin.com/in/toddpalino

RE: Change Topic Name

Posted by Vladimir Picka <os...@gmail.com>.
Does creating new topic with new name and the same settings as the original one and directly copying files from kafka log directory into the new topic folder work? It would be nice if it would. I don't know if there is anything in log file format info or Zoo info attached to original topic which would prevent it to work.

Petr

-----Original Message-----
From: Todd Palino [mailto:tpalino@gmail.com] 
Sent: 1. června 2016 10:48
To: users@kafka.apache.org
Subject: Re: Change Topic Name

There's no way to do that. If you're trying to maintain data, you'll need to read all the data from the existing topic and produce it to the new one.

-Todd

On Wednesday, June 1, 2016, Johannes Nachtwey < johannes.nachtweyatwork@gmail.com> wrote:

> Hi guys,
>
> it´s possible to change an existing topic name?
>
> Thanks and best wishes
> Johannes
>


--
*Todd Palino*
Staff Site Reliability Engineer
Data Infrastructure Streaming



linkedin.com/in/toddpalino


Re: Change Topic Name

Posted by Todd Palino <tp...@gmail.com>.
There's no way to do that. If you're trying to maintain data, you'll need
to read all the data from the existing topic and produce it to the new one.

-Todd

On Wednesday, June 1, 2016, Johannes Nachtwey <
johannes.nachtweyatwork@gmail.com> wrote:

> Hi guys,
>
> it´s possible to change an existing topic name?
>
> Thanks and best wishes
> Johannes
>


-- 
*Todd Palino*
Staff Site Reliability Engineer
Data Infrastructure Streaming



linkedin.com/in/toddpalino