You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Karan Gupta <ka...@gmail.com> on 2016/02/12 17:07:44 UTC
"Topic Created" event
Hello,
I am learning how to use kafka as my personal project.
I was wondering if there is a "topic created" event that kafka or zookeeper
sends such that a simple scala/java program can listen to. I was not able
to find any documentation on that.
Thanks for any advice :)
--
Best regards
Karan
Re: "Topic Created" event
Posted by Christian Posta <ch...@gmail.com>.
Wonder if you can listen to the zkPath for topics via a zk watch (
https://zookeeper.apache.org/doc/r3.3.3/api/org/apache/zookeeper/Watcher.html)
to let you know when the structure of the tree changes (ie, add/remove)?
The zkPath for topics is "/brokers/topics"
https://github.com/christian-posta/kafka/blob/trunk/core/src/main/scala/kafka/utils/ZkUtils.scala#L59-59
HTH!
On Fri, Feb 12, 2016 at 9:07 AM, Karan Gupta <ka...@gmail.com> wrote:
> Hello,
>
> I am learning how to use kafka as my personal project.
> I was wondering if there is a "topic created" event that kafka or zookeeper
> sends such that a simple scala/java program can listen to. I was not able
> to find any documentation on that.
>
> Thanks for any advice :)
> --
>
> Best regards
> Karan
>
--
*Christian Posta*
twitter: @christianposta
http://www.christianposta.com/blog
http://fabric8.io