I have a local instance of the ActiveMQ message service running on good ol’ localhost:61616, to try out queue stuff locally. A few weeks ago, when I had been working on a small queue usage proof-of-concept project which would be committed to the research area of the source repository, one of the domain guys asked about an “OurQueue” queue that had shown up on the prototype’s ActiveMQ server. He asked if I knew anything about it or if it was needed. That was the name of the queue I was using on my local test project — I was surprised to see it show up there on the prototype’s server, but I figured I had been late in reconfiguring one of the tests to point to my local server instead of the one on the network. I told him it was fine for him to get rid of the queue, and went on.
But then today I was starting up ActiveMQ locally and saw these log messages:
INFO DiscoveryNetworkConnector – Establishing network connection between from vm://localhost to tcp://OTHERSERVER:61616
INFO TransportConnector – Connector vm://localhost Started
INFO DemandForwardingBridge – Network connection between vm://localhost#0 and tcp://OTHERSERVER/192.168.77.78:61616(localhost) has been established.
(server name and IP address not the actual ones)
Hey, why is my local ActiveMQ talking to the remote ActiveMQ server?
To the Bridge!
In short, under broker -> networkConnectors, there is a networkConnector element to this effect:
<!-- by default just auto discover the other brokers --> <amq:networkConnector name="default-nc" uri="multicast://default"/>
If I comment out the networkConnector element, I no longer get the “Establishing network connection” message, nor the DemandForwardingBridge message. Now I think I should be able to test locally without my silly-named queues showing up on the remote server. :)