...
For more information see the Discovery Transport Reference.
Zeroconf
Zeroconf ZeroConf is a standard discovery specification that uses UDP / multicast to discovery devices. Its used by Apple's Rendezvous services.
We use the jmDNS project to implement the Zeroconf specification to detect services. This means other Zeroconf
based tools can be used in conjunction with this discovery agent.
To configure discovery in a Broker you should use the Xml Configuration. Here is an example of using discovery to create Networks of Brokers.
If you have one or more brokers running with Zeroconf discovery enabled you can connect to a broker using the brokerURL
Code Block |
zeroconf:_activemq_development.
|
...
If you run the following commands in separate shells you'll have 2 brokers auto-discovering themselves and 2 clients using fixed-URLs
Code Block |
maven -o server -Dconfig=src/test/org/activemq/usecases/receiver-zeroconf.xml
maven -o server -Dconfig=src/test/org/activemq/usecases/sender-zeroconf.xml
maven -o consumer -Durl=tcp://localhost:62002
maven -o producer -Durl=tcp://localhost:62001
|
If you want the clients to use discovery to find brokers, run either of the two 'server' statements above (or both) then run the producer/consumer as follows
Code Block |
maven -o consumer -Durl=zeroconf:_activemq.broker.development.
maven -o producer -Durl=zeroconf:_activemq.broker.development.
|
The transport URL is of the format
Code Block |
zeroconf:<serviceName>
|
where <serviceName> is the Zeroconf service name; which seems to start with an underscore (_) and must end with a dot (.). So we can use this service name to distinguish development, UAT & production brokers - or group them into domains etc.
...