Package com.alibaba.rocketmq.tools.admin

Examples of com.alibaba.rocketmq.tools.admin.DefaultMQAdminExt.start()


                return;
            }
            else if (commandLine.hasOption('c')) {
                String clusterName = commandLine.getOptionValue('c').trim();
                adminExt.start();

                Set<String> masterSet = CommandUtil.fetchMasterAddrByClusterName(adminExt, clusterName);
                for (String master : masterSet) {
                    adminExt.deleteSubscriptionGroup(master, groupName);
                    System.out.printf(
View Full Code Here


        DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt();
        defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));

        try {
            boolean result = false;
            defaultMQAdminExt.start();
            if (commandLine.hasOption('b')) {
                String addr = commandLine.getOptionValue('b').trim();
                result = defaultMQAdminExt.cleanExpiredConsumerQueueByAddr(addr);

            }
View Full Code Here

        DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt();

        defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));

        try {
            defaultMQAdminExt.start();

            // 查询特定consumer
            if (commandLine.hasOption('g')) {
                String consumerGroup = commandLine.getOptionValue('g').trim();
                ConsumeStats consumeStats = defaultMQAdminExt.examineConsumeStats(consumerGroup);
View Full Code Here

        DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt();
        defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));
        try {
            if (commandLine.hasOption("i")) {
                String ip = commandLine.getOptionValue('i').trim();
                defaultMQAdminExt.start();
                String project = defaultMQAdminExt.getProjectGroupByIp(ip);
                System.out.printf("ip=%s, projectGroup=%s\n", ip, project);
            }
            else if (commandLine.hasOption("p")) {
                String project = commandLine.getOptionValue('p').trim();
View Full Code Here

                String project = defaultMQAdminExt.getProjectGroupByIp(ip);
                System.out.printf("ip=%s, projectGroup=%s\n", ip, project);
            }
            else if (commandLine.hasOption("p")) {
                String project = commandLine.getOptionValue('p').trim();
                defaultMQAdminExt.start();
                String ips = defaultMQAdminExt.getIpsByProjectGroup(project);
                if (UtilAll.isBlank(ips)) {
                    System.out.printf("No ip in project group[%s]\n", project);
                }
                else {
View Full Code Here

            String topic = commandLine.getOptionValue('t').trim();

            if (commandLine.hasOption('c')) {
                String clusterName = commandLine.getOptionValue('c').trim();

                adminExt.start();
                // 删除 broker 上的 topic 信息
                Set<String> masterSet = CommandUtil.fetchMasterAddrByClusterName(adminExt, clusterName);
                adminExt.deleteTopicInBroker(masterSet, topic);
                System.out.printf("delete topic [%s] from cluster [%s] success.\n", topic, clusterName);
View Full Code Here

            // key name
            String key = commandLine.getOptionValue('k').trim();
            // key name
            String value = commandLine.getOptionValue('v').trim();

            defaultMQAdminExt.start();
            defaultMQAdminExt.createAndUpdateKvConfig(namespace, key, value);
            System.out.printf("create or update kv config to namespace success.\n");
            return;
        }
        catch (Exception e) {
View Full Code Here

        try {
            String namespace = NamesrvUtil.NAMESPACE_PROJECT_CONFIG;

            if (commandLine.hasOption("i")) {
                String ip = commandLine.getOptionValue('i').trim();
                defaultMQAdminExt.start();
                defaultMQAdminExt.deleteKvConfig(namespace, ip);
                System.out.printf("delete project group from namespace by server ip success.\n");
            }
            else if (commandLine.hasOption("p")) {
                String project = commandLine.getOptionValue('p').trim();
View Full Code Here

                defaultMQAdminExt.deleteKvConfig(namespace, ip);
                System.out.printf("delete project group from namespace by server ip success.\n");
            }
            else if (commandLine.hasOption("p")) {
                String project = commandLine.getOptionValue('p').trim();
                defaultMQAdminExt.start();
                defaultMQAdminExt.deleteIpsByProjectGroup(project);
                System.out.printf("delete all server ip from namespace by project group success.\n");
            }
            else {
                ServerUtil.printCommandLineHelp("mqadmin " + this.commandName(), options);
View Full Code Here

            }

            if (commandLine.hasOption('b')) {
                String addr = commandLine.getOptionValue('b').trim();

                defaultMQAdminExt.start();
                defaultMQAdminExt.createAndUpdateTopicConfig(addr, topicConfig);

                if (isOrder) {
                    // 注册顺序消息到 nameserver
                    String brokerName = CommandUtil.fetchBrokerNameByAddr(defaultMQAdminExt, addr);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.