Great, thanks for sharing the code in case someone else has the same
question in the future.

Tim

On Tue, May 22, 2018, 11:37 PM maorbl <mao...@gmail.com> wrote:

> 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
>

Reply via email to