public boolean removeNetworkConnector(String connectorName) throws Exception {
NetworkConnector connector = brokerService.getNetworkConnectorByName(connectorName);
if (connector == null) {
throw new NoSuchElementException("Not connector matched the given name: " + connectorName);
}
connector.stop();
return brokerService.removeNetworkConnector(connector);
}
public void addTopic(String name) throws Exception {
safeGetBroker().getContextBroker().addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()), new ActiveMQTopic(name),true);