use of org.apache.rocketmq.console.model.request.TopicConfigInfo in project rocketmq-externals by apache.
the class TopicServiceImpl method examineTopicConfig.
@Override
public List<TopicConfigInfo> examineTopicConfig(String topic) {
List<TopicConfigInfo> topicConfigInfoList = Lists.newArrayList();
TopicRouteData topicRouteData = route(topic);
for (BrokerData brokerData : topicRouteData.getBrokerDatas()) {
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
TopicConfig topicConfig = examineTopicConfig(topic, brokerData.getBrokerName());
BeanUtils.copyProperties(topicConfig, topicConfigInfo);
topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
topicConfigInfoList.add(topicConfigInfo);
}
return topicConfigInfoList;
}
use of org.apache.rocketmq.console.model.request.TopicConfigInfo in project rocketmq-externals by apache.
the class TopicServiceImplTest method createOrUpdate.
@Test
public void createOrUpdate() throws Exception {
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
topicConfigInfo.setBrokerNameList(Lists.newArrayList(TestConstant.TEST_BROKER_NAME));
topicConfigInfo.setTopicName(TEST_CREATE_DELETE_TOPIC);
topicService.createOrUpdate(topicConfigInfo);
TopicList topicList = topicService.fetchAllTopicList();
Assert.assertNotNull(topicList);
Assert.assertTrue(CollectionUtils.isNotEmpty(topicList.getTopicList()));
Assert.assertTrue(topicList.getTopicList().contains(TEST_CREATE_DELETE_TOPIC));
}
use of org.apache.rocketmq.console.model.request.TopicConfigInfo in project rocketmq-externals by apache.
the class RocketMQConsoleTestBase method registerTestMQTopic.
protected void registerTestMQTopic() {
TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
topicConfigInfo.setBrokerNameList(Lists.newArrayList(TestConstant.TEST_BROKER_NAME));
topicConfigInfo.setTopicName(TEST_CONSOLE_TOPIC);
topicConfigInfo.setWriteQueueNums(WRITE_QUEUE_NUM);
topicConfigInfo.setReadQueueNums(READ_QUEUE_NUM);
topicConfigInfo.setPerm(PERM);
topicService.createOrUpdate(topicConfigInfo);
}
Aggregations