I opened JIRA issue http://issues.apache.org/activemq/browse/AMQ-2080 AMQ-2080 per your request for #3.
I did NOT open one for #2 because it's not clear to me how that should work. I mean, it's not clear to me what's going on, because there is a significant delay between the time the discovery agent is started and the time it discovers a broker, and it wouldn't be right to block on the discovery agent waiting for it to discover a broker. There's a good chance the code there is working fine, but I was confused because of the underlying problem of initialReconnectDelay not being honored which colored my thinking. I had tried 2 reconnects with a delay of 10000000ms and found it still returned immediately and thought that was a bug in the discovery agent startup sequence rather than what I now think it is which is a more global problem with the delay not being honored. Gary Tully wrote: > > can you raise a jira issue[1] for #3 and possibly #2 as the initiator > of the discovery should wait for it to start imho. > > [1] > http://activemq.apache.org/contributing.html#Contributing-Ifyoufindabugorproblem > > 2009/1/15 BigPic <nab...@jgro.net>: >> >> >> BigPic wrote: >>> >>> I'm using ActiveMQ 5.2.0 but I can't get clients to discover the broker. >>> My goal is to run a single broker with multiple clients all >>> auto-discovering it. >>> >>> I have the broker config: >>> >>> <transportConnectors> >>> <transportConnector name="openwire" >>> uri="tcp://localhost:61616" >>> discoveryUri="multicast://default?group=test"/> >>> </transportConnectors> >>> >>> and the broker is running on a Win2K system. >>> >>> Then on another system (Win XP SP3), I have a Java 1.5 client: >>> >>> String brokerUrl = >>> "discovery:(multicast://default)?group=test&maxReconnectAttempts=2"; >>> ActiveMQConnectionFactory connectionFactory = >>> new ActiveMQConnectionFactory(brokerUrl); >>> >>> >> >> OK, found a few problems. #1 is that the client broker URL should be >> >> String brokerUrl = >> "discovery:(multicast://default?group=test)?maxReconnectAttempts=2"; >> >> #2 is that it appears the discovery agent isn't started until the first >> connection attempt and the connection attempt does not in any way wait >> for >> the discovery agent to be started before trying to connect, so the 2 >> reconnection attempts pass before the discovery agent discovers the >> broker. >> >> #3 is definitely a bug. If I use >> >> String brokerUrl = >> "discovery:(multicast://default?group=test)?maxReconnectAttempts=30&initialReconnectDelay=1000&useExponentialBackOff=false"; >> >> the connection still fails, and in far less than the 30 seconds that >> should >> be necessary to do 30 attempts with a 1000 ms (= 1 second) delay between >> attempts. To get a connection I need to have at least 10 reconnect >> attempts >> and set useExponentialBackOff=true. >> > > > -- View this message in context: http://www.nabble.com/Multicast-Discovery-not-working-tp21344587p21571951.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.