This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: Superseded by KIP-604
Discussion thread: here
JIRA: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
In kafka-topic.sh, we expect to use --if-exists to ensure that the topic to create or change exists. Similarly, we expect to use --if-not-exists to ensure that the topic to create or change does not exist. Currently, only ZookeeperTopicService supports these two options. As a result, specifying --bootstrap-server option with either one of them will trigger an error.
We want to introduce --if-exists and --if-not-exists options to AdminClientTopicService.
Public Interfaces
kafka-topic.sh:
The topic command will accept either --if-exist or --if-not-exist option together with --bootstrap-server option.
Proposed Changes
Implement the logic in AdminClientTopicService like what ZookeeperTopicService has.
Add support to ensure the topic exists in:
- alterTopic()
- describeTopic()
- deleteTopic()
Add support to ensure the topic does not exist in:
- createTopic()