Take the 2-minute tour ×

The Apache ActiveMQ broker supports discovery with IP multicast. This feature is activated in the default 'demo' configuration (see below). I would like to implement the discovery feature in other languages (Delphi / Free Pascal). Is there some minimal code example or introduction page on the web which shows how this would be implemented in Java?

If I understand correctly, the multicast would trigger an answer of the message broker, which contains information about IP and port of the message broker. But I can not figure out which port the client needs to specify (ActiveMQ documentation).

However I can not see which port the multicast client should use.

<!-- Create a TCP transport that is advertised on via an IP multicast
              group named default. -->

Update: I found http://docs.oracle.com/javase/tutorial/networking/datagrams/broadcasting.html and try to use this example code.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The best source of documentation is always the code itself. If you take a look at the source in SVN for ActiveMQ and browse the org.apache.activemq.transports.discovery package you should have a really good understanding of how the discovery bits works, also the default ports are all in the code.

svn co https://svn.apache.org/repos/asf/activemq/trunk activemq

share|improve this answer
Many thanks! With the code I managed to detect a running ActiveMQ broker with Delphi, it is really very easy. –  mjn Sep 6 '12 at 11:49
add comment

Your Answer


