You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Milo Xu <xu...@citics.com> on 2014/07/03 09:34:33 UTC

Multicast Discovery with non-default group name not working

Hi all,

I am using .Net version api (NMS) to discover a broker, the discoveryUrl in
transportConnector of activemq.xml is "multicast://224.0.0.10:17500". And I
used the same url in client code and it works.

However, if i want to change to non-default group like
"multicast://224.0.0.10:17500?group=hello", I can capture UDP package from
network and ActiveMq is broadcasting right info, some info from UDP package: 
".....*hello*.ActiveMQ-4.alive.%localhost%tcp://machine_name:61616".

My client code is changed to like this:

using Apache.NMS;
using Apache.NMS.Util;

var brokerUrl =
"activemq.discovery:(multicast://224.0.0.10:17500?group=hello)";
var connectionFactory = new NMSConnectionFactory(brokerUrl);
var connection = connectionFactory.CreateConnection();
var session = connection.CreateSession();  <== Execution hangs here!

My application hangs on the last line. If using the default group name
(without setting '?group=hello'), it works fine. My environment is
 1. ActiveMq server : 5.10.0
 2. Apache.NMS.ActiveMQ.dll: 1.6.2
 3. Apache.NMS.dll: 1.6.0
 4. Code is compiled in VS2013, against .Net 4 framework.

Has anyone encourntered same issue?

Thanks in advance.

Regards,
Milo



--
View this message in context: http://activemq.2283324.n4.nabble.com/Multicast-Discovery-with-non-default-group-name-not-working-tp4682758.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Multicast Discovery with non-default group name not working

Posted by Eric Tan <cc...@yahoo.com>.
Hi Milo,

I'm having the same problem with Apache.NMS.ActiveMQ 1.6.3.

Looking at the code, the problem maybe due to MulticastDiscoveryAgent
defining the "group" field which override the "group" field in it's parent
class AbstractDiscoveryAgent. 

As MulticastDiscoveryAgent didn't define the property for setting group
field and AbstractDiscoveryAgent does, the group parameter value in the uri
will be set to the group field in AbstractDiscoveryAgent instead of the one
in MulticastDiscoveryAgent. 






--
View this message in context: http://activemq.2283324.n4.nabble.com/Multicast-Discovery-with-non-default-group-name-not-working-tp4682758p4687397.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Multicast Discovery with non-default group name not working

Posted by Milo Xu <xu...@citics.com>.
Another question, does ActiveMQ support publisher broadcast messages to
consumers directly using multicast?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Multicast-Discovery-with-non-default-group-name-not-working-tp4682758p4682805.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.