1. Engineering
  2. Computer Science
  3. public class topicmanager this class deals with all...

Question: public class topicmanager this class deals with all...

Question details
public class TopicManager
        This class deals with all topic related operations-
        creation, deletion and maybe modification in future
    private static ZkClient zkClient = null;
    private static ZkUtils zkUtils = null;

    public static void createTopic(String topicName) throws Exception
        Properties topicConfiguration = new Properties();

        MessageLogger.debugAlways(KafkaConstants.COMPONENT_NAME,"Creating topic with name: " + topicName);
            runAdminUtilsCommand( zkUtils ->
                AdminUtils.createTopic(zkUtils, topicName,  0, 3, topicConfiguration,new RackAwareMode.Disabled$());
                return true;

    public static void deleteTopic(String topicName) throws Exception
        // Please complete this method

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution