...
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.
...
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.
...