activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yudy <y...@uh.cu>
Subject Problems with a network of brokers using embedded brokers
Date Fri, 09 Jun 2006 00:53:48 GMT

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.


Mime
View raw message