activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maorbl <mao...@gmail.com>
Subject Re: Add multiple network connectors dynamically
Date Wed, 23 May 2018 05:37:15 GMT
Just wanted to update that eventually I added the network connectors 
not with the proxy (BrokerViewMBean), but with the broker itself
(BrokerService).
This is the code that adds a new network connector (similar to how
activemq code handles a new network connector):
 

NetworkConnector networkConnector =
m_broker.addNetworkConnector(friendBrokerUrl);
        networkConnector.setName(DEFAULT_NETWORK_CONNECTOR_NAME + "_" +
friendBrokerName + "_" + serviceName.toLowerCase());
        networkConnector.setLocalUri(m_broker.getVmConnectorURI());
        networkConnector.setBrokerName(m_broker.getBrokerName());
       
networkConnector.setDurableDestinations(m_broker.getBroker().getDurableDestinations());
        if(m_broker.getDefaultSocketURIString() != null) {
           
networkConnector.setBrokerURL(m_broker.getDefaultSocketURIString());
        }

        // register network connector MBean
        m_broker.registerNetworkConnectorMBean(networkConnector);

        // start network connector
        networkConnector.start();



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Mime
View raw message