On 6/13/07, Torsten Curdt <tcurdt@apache.org> 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://_activemq.broker.development.");
> 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
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/receiver-zeroconf.xml?view=co
i.e. you need to add a ZeroConf based discovery agent.
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("zeroconf://_activemq.broker.development.");
>
> 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
> "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 :)
The docs in this area were a bit crusty & in some places none existent
:). So I've tried to tidy up a bit. There's a new discovery section at
the bottom of this page
http://cwiki.apache.org/ACTIVEMQ/configuring-transports.html
in particular there's a page on the discovery transport (using our own
multicast discovery agent)
http://cwiki.apache.org/ACTIVEMQ/discovery-transport-reference.html
along with a page on the zeroconf transport
--
http://cwiki.apache.org/ACTIVEMQ/zeroconf-transport-reference.html
which also describe how to configure the broker.
James
-------
http://macstrac.blogspot.com/
|