You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sumit Maheshwari <su...@gmail.com> on 2017/03/23 18:19:30 UTC

Re: Reg: Callback on kafka metadata update

Can someone please help with the reply ?

On Tue, Mar 21, 2017 at 2:53 PM, Sumit Maheshwari <su...@gmail.com>
wrote:

> Hi,
>
> I am looking for a callback that I can depend on to get notified when
> kafka metadata changes.
> For example:
>
>    - Creation of new topic
>    - Addition of partitions to existing topic
>    - Delete of topic
>    - and so on...
>
>
>
> One way which I was thinking was depend on KafkaController class which has
> methods like onNewTopicCreation and onNewPartitionCreation.
> But one thing which i noticed was when there is no active controller for
> the cluster, we miss out on such updates.
>
> Also I am not looking for polling zookeeper continuously to get such
> updates.
>
> Can someone point out what could be the best way to get such updates?
>
> Thanks,
> Sumit
>

Re: Reg: Callback on kafka metadata update

Posted by Manikumar <ma...@gmail.com>.
we don't have this notification functionality. one way to implement this is
by setting
watches on respective zookeeper nodes and listen to notifications.

On Thu, Mar 23, 2017 at 11:49 PM, Sumit Maheshwari <su...@gmail.com>
wrote:

> Can someone please help with the reply ?
>
> On Tue, Mar 21, 2017 at 2:53 PM, Sumit Maheshwari <su...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am looking for a callback that I can depend on to get notified when
> > kafka metadata changes.
> > For example:
> >
> >    - Creation of new topic
> >    - Addition of partitions to existing topic
> >    - Delete of topic
> >    - and so on...
> >
> >
> >
> > One way which I was thinking was depend on KafkaController class which
> has
> > methods like onNewTopicCreation and onNewPartitionCreation.
> > But one thing which i noticed was when there is no active controller for
> > the cluster, we miss out on such updates.
> >
> > Also I am not looking for polling zookeeper continuously to get such
> > updates.
> >
> > Can someone point out what could be the best way to get such updates?
> >
> > Thanks,
> > Sumit
> >
>