// Important Get a Read Lock....
readLockUnlockConsumers(true);
try {
// 1, Topic only
ConsumerList topicConsumerList = consumerListmanager.getConsumerListByToken(topic);
if (topicConsumerList != null) {// has subscription to this topic
ArrayList<ConsumerInfo> list = topicConsumerList.getConsumerList();
matchedConsumers.addAll(list);
}
// 2, wild card topic only
ConsumerList wildcardConsumerList = consumerListmanager
.getConsumerListByToken(WsmgCommonConstants.WILDCARD_TOPIC);
if (wildcardConsumerList != null) {// has wildcard subscriptions
List<ConsumerInfo> wildCardConsumerInfoList = wildcardConsumerList.getConsumerList();
if (wildCardConsumerInfoList != null) {
// System.out.println("ConsumerListSize2="+wildCardConsumerInfoList.size());
matchedConsumers.addAll(wildCardConsumerInfoList);
}
}