activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sridhar Komandur" <>
Subject MulticastDiscoveryAgent question ...
Date Sun, 06 Aug 2006 22:07:58 GMT

I had a question regarding the code below - doTimeKeepingServices() is
called the very first time and
then it is waiting on mcast.receive - so it will advertize itself after
hearing from another broker, assuming keepAliveInterval
has elapsed.

Should we instead run doTimeKeepingServices on its own schedule, instead of
relying on distributed event driven advertisement ?  My concern is 1. that
since the first advertisement
is not retried, a new broker might miss others when its advertisement
(multicast packet) is lost on occasion (everybody is waiting on multicast
receive). 2. When large number of brokers are brought up, potential race
condition would result in some brokers not see each other.

I will create a Jira if somebody can confirm I haven't missed anything.

(Coming from a router background, usually there is a base timer that drives
all the calendar activity in the message router)

- Sridhar

 public void run(){
        byte[] buf=new byte[BUFF_SIZE];
        DatagramPacket packet=new DatagramPacket(buf,0,buf.length);
                    String str=new String(packet.getData(),packet.getOffset
            }catch(SocketTimeoutException se){
                // ignore
            }catch(IOException e){
                log.error("failed to process packet: "+e);

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message