Java Code Examples for org.apache.rocketmq.client.impl.factory.MQClientInstance#topicRouteData2TopicPublishInfo()
The following examples show how to use
org.apache.rocketmq.client.impl.factory.MQClientInstance#topicRouteData2TopicPublishInfo() .
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: MQAdminImpl.java From rocketmq-read with Apache License 2.0 | 6 votes |
/** * 根据topic获取Publish的消息的队列详情 * @param topic topic * @return ; * @throws MQClientException ; */ public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 2
Source File: MQAdminImpl.java From DDMQ with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 3
Source File: MQAdminImpl.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 4
Source File: MQAdminImpl.java From rocketmq with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 5
Source File: MQAdminImpl.java From DDMQ with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 6
Source File: MQAdminImpl.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 7
Source File: MQAdminImpl.java From rocketmq_trans_message with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return topicPublishInfo.getMessageQueueList(); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }
Example 8
Source File: MQAdminImpl.java From rocketmq with Apache License 2.0 | 5 votes |
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException { try { TopicRouteData topicRouteData = this.mQClientFactory.getMQClientAPIImpl().getTopicRouteInfoFromNameServer(topic, timeoutMillis); if (topicRouteData != null) { TopicPublishInfo topicPublishInfo = MQClientInstance.topicRouteData2TopicPublishInfo(topic, topicRouteData); if (topicPublishInfo != null && topicPublishInfo.ok()) { return parsePublishMessageQueues(topicPublishInfo.getMessageQueueList()); } } } catch (Exception e) { throw new MQClientException("Can not find Message Queue for this topic, " + topic, e); } throw new MQClientException("Unknow why, Can not find Message Queue for this topic, " + topic, null); }