[ https://issues.apache.org/jira/browse/KAFKA-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14128771#comment-14128771 ]
Chris Riccomini commented on KAFKA-560: --------------------------------------- bq. It would be good to have a tool that could delete any topic that had not been written to in a configurable period of time and had no active consumer groups. I would prefer not to depend on consumer groups. Samza, for example, doesn't have consumer groups, so doing things like looking at the lsat offset commit of a consumer group in ZK/OffsetManager will not help if the consumer is using Samza (or some other offset checkpoint mechanism). The better approach, to me, seems to be to just have brokers keep track of approximate last-reads for each topic/partition based on FetchRequests. > Garbage Collect obsolete topics > ------------------------------- > > Key: KAFKA-560 > URL: https://issues.apache.org/jira/browse/KAFKA-560 > Project: Kafka > Issue Type: New Feature > Reporter: Jay Kreps > Labels: project > > Old junk topics tend to accumulate over time. Code may migrate to use new > topics leaving the old ones orphaned. Likewise there are some use cases for > temporary transient topics. It would be good to have a tool that could delete > any topic that had not been written to in a configurable period of time and > had no active consumer groups. Something like > ./bin/delete-unused-topics.sh --last-write [date] --zookeeper [zk_connect] > This requires API support to get the last update time. I think it may be > possible to do this through the OffsetRequest now? -- This message was sent by Atlassian JIRA (v6.3.4#6332)