activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Camilleri <jerome.camill...@bull.net>
Subject Network of Brokers in two JVM into different host
Date Fri, 28 Apr 2006 14:30:34 GMT
Hi,

 From previous mail in this list, the following configuration run when 
you want run two instances of activeMQ in *localhost* :

<beans xmlns="http://activemq.org/config/1.0">
 <broker brokerName="broker1" persistent="true" useJmx="false">
   <transportConnectors>
     <transportConnector uri="tcp://localhost:60001"
discoveryUri="multicast://default"/>
   </transportConnectors>

   <networkConnectors>
     <networkConnector uri="multicast://default"/>
   </networkConnectors>

   <persistenceAdapter>
     <memoryPersistenceAdapter/>
   </persistenceAdapter>
 </broker>
</beans>

But I would like to lauch my two ActiveMQ brokers into *differents* 
*hosts* : server1 and server2.
In this configuration, can I used multicast discovery  like this  ?

<beans xmlns="http://activemq.org/config/1.0">
 <broker brokerName="broker1" persistent="true" useJmx="false">
   <transportConnectors>
     <transportConnector uri="tcp://localhost:60001"
discoveryUri="multicast://server2:60001"/>
   </transportConnectors>

   <networkConnectors>
     <networkConnector uri="multicast://default"/>
   </networkConnectors>

   <persistenceAdapter>
     <memoryPersistenceAdapter/>
   </persistenceAdapter>
 </broker>
</beans>

Is seems that brokers don't communicate  between them...

Should I used static list instead of multicast ?? but in this case I a 
bit confused about how write my 2 configurations :

Server1 :
<beans xmlns="http://activemq.org/config/1.0">
 <broker brokerName="broker1" persistent="true" useJmx="false">
   <transportConnectors>
     <transportConnector uri="tcp://localhost:60001"/>
   </transportConnectors>

   <networkConnectors>
     <networkConnector uri="static://(tcp://localhost:61616,tcp://server1:61616)"/>
   </networkConnectors>

   <persistenceAdapter>
     <memoryPersistenceAdapter/>
   </persistenceAdapter>
 </broker>
</beans>

Server2 :

<beans xmlns="http://activemq.org/config/1.0">
 <broker brokerName="broker1" persistent="true" useJmx="false">
   <transportConnectors>
     <transportConnector uri="tcp://localhost:60001"/>
   </transportConnectors>

   <networkConnectors>
     <networkConnector uri="static://(tcp://localhost:61616,tcp://server2:61616)"/>
   </networkConnectors>

   <persistenceAdapter>
     <memoryPersistenceAdapter/>
   </persistenceAdapter>
 </broker>
</beans>

All my test failed with a excetion like connection refused...

Someone could help me pleased ?

Jérôme

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