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();
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?
"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
Caught: java.lang.IllegalArgumentException: port out of
range:-1java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:63)
at org.apache.activemq.transport.udp.UdpTransport.createLocalAddress
(UdpTransport.java:427)
...
But even explicitly giving an address for the multicast group and
port seems not to work as expected.
BrokerService broker = new BrokerService();
broker.setUseJmx(true);
broker.addConnector("multicast://localhost:8999");
broker.start();
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("multicast://localhost:8999");
I am getting a bind exception ("address already in use") for this.
What am I missing?
Also I am not so sure how http://activecluster.codehaus.org fits the
whole picture yet.
Some wise words would be appreciated :)
cheers
--
Torsten