Search code examples
activemq-classicmulticastdiscoverybroker

How to expose ActiveMQ Multicast network to public and access using remote machines?


Hi I'm evaluating different discovery protocols in ActiveMQ and I have a problem with the Multicast Discovery in network of brokers.

I've setup a network of brokers with 3 activeMQ broker connected to a multicast group

<transportConnectors> <transportConnector name="default" uri="tcp://192.168.11.1:61616" discoveryUri="multicast://default?group=Bus"/> </transportConnectors>

I have a producer in different network - 192.168.5.10 and when I try to create a connection to the network my producer was not able to discover it

...
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("discovery:(multicast://default?group=Bus)");
...

but when I try to connect using the failover, I was able to create connection and produce message successfully

...
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("failover:(tcp://192.168.11.1:61616,tcp://192.168.11.2:61616,tcp://192.168.11.3:61616)");
...

Now my question is how to make the multicast uri to be accessed globally? I've referred the following document here. But was not sufficient for me to understand.

If someone could shed some light on this, it would be really helpful. Thanks in advance!


Solution

  • Making multicast accessible within your environment is a question for your Network Administrators. They will need to enable IGMP routing for multicast to work.

    For an overview of how multicast works see: http://www.enterprisenetworkingplanet.com/netsp/article.php/3623181/Networking-101--Understanding-Multicast-Routing.htm

    For details on configuring IGMP on a cisco device, see http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfmulti.html

    I am pretty sure it's not enabled by default on most routers.