Changed api to setBrokerName() on DemandForwardBridge instead of setClientId

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@373858 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-01-31 16:25:17 +00:00
parent 2ae7169856
commit 815b6c5d87
5 changed files with 16 additions and 4 deletions

View File

@ -57,7 +57,7 @@ public class MultiBrokersMultiClientsUsingTcpTest extends MultiBrokersMultiClien
if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) { if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI), DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI),
TransportFactory.connect(remoteURI)); TransportFactory.connect(remoteURI));
bridge.setClientId(localBroker.getBrokerName() + "_to_" + remoteBroker.getBrokerName()); bridge.setLocalBrokerName(localBroker.getBrokerName());
bridges.add(bridge); bridges.add(bridge);
bridge.start(); bridge.start();

View File

@ -44,7 +44,7 @@ public class ThreeBrokerQueueNetworkUsingTcpTest extends ThreeBrokerQueueNetwork
if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) { if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI), DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI),
TransportFactory.connect(remoteURI)); TransportFactory.connect(remoteURI));
bridge.setClientId(localBroker.getBrokerName() + "_to_" + remoteBroker.getBrokerName()); bridge.setLocalBrokerName(localBroker.getBrokerName());
bridges.add(bridge); bridges.add(bridge);
bridge.start(); bridge.start();

View File

@ -47,6 +47,8 @@ public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientB = createConsumer("BrokerB", dest); MessageConsumer clientB = createConsumer("BrokerB", dest);
MessageConsumer clientC = createConsumer("BrokerC", dest); MessageConsumer clientC = createConsumer("BrokerC", dest);
// let consumers propogate around the network
Thread.sleep(2000);
// Send messages // Send messages
sendMessages("BrokerA", dest, MESSAGE_COUNT); sendMessages("BrokerA", dest, MESSAGE_COUNT);
sendMessages("BrokerB", dest, MESSAGE_COUNT); sendMessages("BrokerB", dest, MESSAGE_COUNT);
@ -84,6 +86,8 @@ public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientB = createConsumer("BrokerB", dest); MessageConsumer clientB = createConsumer("BrokerB", dest);
MessageConsumer clientC = createConsumer("BrokerC", dest); MessageConsumer clientC = createConsumer("BrokerC", dest);
// let consumers propogate around the network
Thread.sleep(2000);
// Send messages // Send messages
sendMessages("BrokerA", dest, MESSAGE_COUNT); sendMessages("BrokerA", dest, MESSAGE_COUNT);
sendMessages("BrokerB", dest, MESSAGE_COUNT); sendMessages("BrokerB", dest, MESSAGE_COUNT);
@ -121,6 +125,9 @@ public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientB = createConsumer("BrokerB", dest); MessageConsumer clientB = createConsumer("BrokerB", dest);
MessageConsumer clientC = createConsumer("BrokerC", dest); MessageConsumer clientC = createConsumer("BrokerC", dest);
// let consumers propogate around the network
Thread.sleep(2000);
// Send messages // Send messages
sendMessages("BrokerA", dest, MESSAGE_COUNT); sendMessages("BrokerA", dest, MESSAGE_COUNT);
sendMessages("BrokerB", dest, MESSAGE_COUNT); sendMessages("BrokerB", dest, MESSAGE_COUNT);
@ -161,6 +168,8 @@ public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientA = createConsumer("BrokerA", dest); MessageConsumer clientA = createConsumer("BrokerA", dest);
MessageConsumer clientB = createConsumer("BrokerB", dest); MessageConsumer clientB = createConsumer("BrokerB", dest);
MessageConsumer clientC = createConsumer("BrokerC", dest); MessageConsumer clientC = createConsumer("BrokerC", dest);
//let consumers propogate around the network
Thread.sleep(2000);
// Send messages // Send messages
sendMessages("BrokerA", dest, MESSAGE_COUNT); sendMessages("BrokerA", dest, MESSAGE_COUNT);
@ -198,6 +207,9 @@ public class ThreeBrokerTopicNetworkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientB = createConsumer("BrokerB", dest); MessageConsumer clientB = createConsumer("BrokerB", dest);
MessageConsumer clientC = createConsumer("BrokerC", dest); MessageConsumer clientC = createConsumer("BrokerC", dest);
//let consumers propogate around the network
Thread.sleep(2000);
// Send messages // Send messages
sendMessages("BrokerA", dest, MESSAGE_COUNT); sendMessages("BrokerA", dest, MESSAGE_COUNT);
sendMessages("BrokerB", dest, MESSAGE_COUNT); sendMessages("BrokerB", dest, MESSAGE_COUNT);

View File

@ -44,7 +44,7 @@ public class ThreeBrokerTopicNetworkUsingTcpTest extends ThreeBrokerTopicNetwork
if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) { if (remoteURI.toString().startsWith("tcp:") && localURI.toString().startsWith("tcp:")) {
DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI), DemandForwardingBridge bridge = new DemandForwardingBridge(TransportFactory.connect(localURI),
TransportFactory.connect(remoteURI)); TransportFactory.connect(remoteURI));
bridge.setClientId(localBroker.getBrokerName() + "_to_" + remoteBroker.getBrokerName()); bridge.setLocalBrokerName(localBroker.getBrokerName());
bridges.add(bridge); bridges.add(bridge);
bridge.start(); bridge.start();

View File

@ -125,7 +125,7 @@ public class TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest extends JmsMultip
super.serviceLocalCommand(command); super.serviceLocalCommand(command);
} }
}; };
bridge.setClientId(localBroker.getBrokerName() + "_to_" + remoteBroker.getBrokerName()); bridge.setLocalBrokerName(localBroker.getBrokerName());
bridges.add(bridge); bridges.add(bridge);
bridge.start(); bridge.start();