org.apache.rocketmq.test.util.MQAdmin Java Examples
The following examples show how to use
org.apache.rocketmq.test.util.MQAdmin.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IntegrationTestBase.java From DDMQ with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName, int queueNumbers) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, queueNumbers); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #2
Source File: IntegrationTestBase.java From rocketmq-4.3.0 with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName, int queueNumbers) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, queueNumbers); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #3
Source File: IntegrationTestBase.java From rocketmq-read with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName, int queueNumbers) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, queueNumbers); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #4
Source File: BaseConf.java From rocketmq with Apache License 2.0 | 6 votes |
public static String initTopic() { long startTime = System.currentTimeMillis(); String topic = MQRandomUtils.getRandomTopic(); boolean createResult = false; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, 8); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMonment(500); continue; } } return topic; }
Example #5
Source File: IntegrationTestBase.java From DDMQ with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName, int queueNumbers) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, queueNumbers); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #6
Source File: IntegrationTestBase.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, 8); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #7
Source File: BaseConf.java From rocketmq_trans_message with Apache License 2.0 | 6 votes |
public static String initTopic() { long startTime = System.currentTimeMillis(); String topic = MQRandomUtils.getRandomTopic(); boolean createResult = false; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, 8); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMonment(500); continue; } } return topic; }
Example #8
Source File: IntegrationTestBase.java From rocketmq with Apache License 2.0 | 6 votes |
public static boolean initTopic(String topic, String nsAddr, String clusterName, int queueNumbers) { long startTime = System.currentTimeMillis(); boolean createResult; while (true) { createResult = MQAdmin.createTopic(nsAddr, clusterName, topic, queueNumbers); if (createResult) { break; } else if (System.currentTimeMillis() - startTime > topicCreateTime) { Assert.fail(String.format("topic[%s] is created failed after:%d ms", topic, System.currentTimeMillis() - startTime)); break; } else { TestUtils.waitForMoment(500); continue; } } return createResult; }
Example #9
Source File: BaseConf.java From DDMQ with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #10
Source File: BaseConf.java From rocketmq-4.3.0 with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #11
Source File: BaseConf.java From rocketmq-read with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #12
Source File: BaseConf.java From rocketmq with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #13
Source File: BaseConf.java From DDMQ with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #14
Source File: BaseConf.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #15
Source File: BaseConf.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }
Example #16
Source File: BaseConf.java From rocketmq with Apache License 2.0 | 4 votes |
public static String initConsumerGroup(String group) { MQAdmin.createSub(nsAddr, clusterName, group); return group; }