Is it not possible to use a broker discovery method for this purpose? It should be simple enough to implement the DiscoveryAgent interface and plug it into the brokers. Take a look at DiscoveryNetworkConnector for that approach.
To directly add network connectors to a running broker, use one of the BrokerService.addNetworkConnector() methods. Note that it may be necessary to "manually" start the connector after using one of these methods, if the broker is already running. If you don't have the BrokerService object easily injected into the code in question (the preferred method), then the BrokerRegistry may be the solution to obtaining it. Hope this helps. -- View this message in context: http://activemq.2283324.n4.nabble.com/Create-network-of-brokers-dynamically-using-java-tp4700870p4701050.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
