I am wanting to make the topics into manageable objects. I want to be
create the topic (w/o having to publish something) or delete the topic. I
do know and understand that there is no API to do these. For example, if I
try to publish something to a none-existing topic, I want it to fail
instead of creating a new topic and publishing it to there.

Also I want to save the resources (memory and hard disk in this case) by
deleting unwanted topics. Right now the only way to delete a topic is to
delete the znodes assoicated with the topic (e.g.,
/hedwig/standalone/topics/<topic_name>), then wating for the hedwig hubs
redistribution when hubs realize that the topic is gone. During this window
(from deleting znodes to hubs redistribution happening), publishers and
subscribers can still publish and get the message. I don't want them to be
able to publish or subscribe meanwhile.

My only solution right now it to make my application check if the topic
znode exists or not. This brings down my application's performance. This is
why I am hoping for the hedwig to, at least, add deleteTopic() method or
something.

On Wed, Dec 21, 2011 at 11:58 AM, Ivan Kelly <[email protected]> wrote:

> Nor is there an API to create a topic. A topic in hedwig is never created
> or destroyed explicitly by the client. Why do you want to delete the topic?
> What behaviour are you expecting?
>
> -Ivan
>
>
> On 21 Dec 2011, at 00:13, Daniel S. Kim wrote:
>
> > Hi everyone,
> >
> >
> > Since there is no hedwig API to delete a topic, I used zookeeper java
> client to delete the znodes associated with that topic. For an example, I
> delete /hedwig/standalone/topics/mytopic and its child znode(s) in order to
> delete a topic named, "mytopic". As a result, bookies would delete data
> associated with this topic as well. However, I can still publish and
> subscribe to "mytopic" topic at this point even though there is no znodes
> or data for this topic. The hub kept all the cache and believes that the
> topic is still "alive". The documents says that the hub will lose its topic
> ownership if the hub is overloaded or the periodic redistribution kicks in.
> Is there any way to tell the hub to forget about the topic?
> >
> >
> > Regard,
> >
> >
> > Daniel S. Kim
> >
>
>


-- 
Daniel S. Kim

Reply via email to