activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <>
Subject Re: discovery
Date Wed, 13 Jun 2007 12:56:54 GMT

On 13.06.2007, at 12:44, James Strachan wrote:

> On 6/13/07, Torsten Curdt <> wrote:
>> What I am investigation atm is service discovery and consequent inter
>> service communication. ActiveMQ with zeroconf for broker discovery
>> looks like a good fit for what I am after. So I am playing with
>> 4.1.1. Doing my first baby steps I thought the following should give
>> me a broker and the bus...
>>      BrokerService broker = new BrokerService();
>>      broker.setUseJmx(true);
>>      broker.addConnector("zeroconf://");
>>      broker.start();
> So the broker's connector is TCP; as thats what the clients will use
> to connect to it. Its just a discovery agent is added to advertise
> itself.
> Here's an example in XML
> resources/org/apache/activemq/usecases/receiver-zeroconf.xml?view=co
> i.e. you need to add a ZeroConf based discovery agent.

OK ...but how is that done in code? Probably something along the  
lines of...

            BrokerService broker = new BrokerService();

            DiscoveryNetworkConnector networkConnector = new  

            //FIXME: howto set "" ?


How do I register the transport for the URI prefix "zeroconf". I just  
cannot find how :)

>>      ActiveMQConnectionFactory connectionFactory = new
>> ActiveMQConnectionFactory("zeroconf:// 
>> As zeroconf is not included due to the LGPL license I've downloaded
>> and now have jmdns in my classpath ...what else is missing?
> jmdns is Apache licensed now. Its included in lib/optional of the  
> release

Ah That should be change here then though:

>> "zeroconf" still seems not to be registered yet. Also: IIUC the use
>> of zeroconf is deprecated now and one should look into multicast
>> instead. But using
>>      BrokerService broker = new BrokerService();
>>      broker.setUseJmx(true);
>>      broker.addConnector("multicast://default");
>>      broker.start();
>> as provided in the docs gives me an exception requiring a host and  
>> port
> Just out of interest; where in the docs is that example? I'll fix  
> it :) 


View raw message