You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by yudy <yu...@uh.cu> on 2006/06/09 02:53:48 UTC
Problems with a network of brokers using embedded brokers
I'm trying to create a network of brokers using embedded brokers when I
startup all brokers it seems that all of them established the connections
between them but when I send a message from a broker I can receive it from
another. I'm using ActiveMQ4 and this the code I'm using to configure the
embedded broker and the network of brokers maybe there is something wrong
with the code.
broker = new BrokerService();
try {
broker.setBrokerName(DMSUrl);
broker.setUseJmx(true);
broker.addConnector(DMSUrl);
if (DMSnodesUrls != null) {
StringBuffer urlList = new StringBuffer();
for (String url : DMSnodesUrls) {
urlList.append(url + ',');
}
String list = urlList.substring(0, urlList.length() - 1);
NetworkConnector nc = broker.addNetworkConnector("static:("
+ list+")");
try {
Method m = nc.getClass().getMethod("setFailover", Boolean.TYPE);
m.invoke(nc, true);
} catch (Exception e) {
log.warn("Can't set a failover network of brokers.");
}
}
broker.start();
I really appreciate any help on this.
Best regards
Yudy
--
View this message in context: http://www.nabble.com/Problems-with-a-network-of-brokers-using-embedded-brokers-t1759182.html#a4785467
Sent from the ActiveMQ - User forum at Nabble.com.