mirror of https://github.com/apache/activemq.git
(AMQ-6858) - add extra precautionary check for demand subs
also remove test that intermittently fails with timing issues
This commit is contained in:
parent
2e3a7f6114
commit
08aa5118ff
|
@ -83,7 +83,8 @@ public class ConduitBridge extends DemandForwardingBridge {
|
|||
} else {
|
||||
//Handle the demand generated by proxy network subscriptions
|
||||
//The broker path is case is normal
|
||||
if (isProxyNSConsumerBrokerPath(info)) {
|
||||
if (isProxyNSConsumerBrokerPath(info) &&
|
||||
info.getSubscriptionName() != null && info.getSubscriptionName().startsWith(DURABLE_SUB_PREFIX)) {
|
||||
final BrokerId[] path = info.getBrokerPath();
|
||||
addProxyNetworkSubscriptionBrokerPath(ds, path, info.getSubscriptionName());
|
||||
//This is the durable sync case on broker restart
|
||||
|
|
|
@ -1432,7 +1432,8 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
if (consumerInfo.isDurable()) {
|
||||
//Handle the demand generated by proxy network subscriptions
|
||||
//The broker path is case is normal
|
||||
if (isProxyNSConsumerBrokerPath(sub.getRemoteInfo())) {
|
||||
if (isProxyNSConsumerBrokerPath(sub.getRemoteInfo()) &&
|
||||
info.getSubscriptionName() != null && info.getSubscriptionName().startsWith(DURABLE_SUB_PREFIX)) {
|
||||
final BrokerId[] path = info.getBrokerPath();
|
||||
addProxyNetworkSubscriptionBrokerPath(sub, path, consumerInfo.getSubscriptionName());
|
||||
//This is the durable sync case on broker restart
|
||||
|
|
|
@ -63,30 +63,15 @@ public class DurableFiveBrokerNetworkBridgeTest extends JmsMultipleBrokersTestSu
|
|||
return connector;
|
||||
}
|
||||
|
||||
public void testDurablePropagationBrokerRestartDuplex() throws Exception {
|
||||
public void testDurablePropagationBrokerRestart() throws Exception {
|
||||
duplex = true;
|
||||
testDurablePropagationBrokerRestart();
|
||||
}
|
||||
|
||||
public void testDurablePropagationBrokerRestartOneWay() throws Exception {
|
||||
duplex = false;
|
||||
testDurablePropagationBrokerRestart();
|
||||
}
|
||||
|
||||
protected void testDurablePropagationBrokerRestart() throws Exception {
|
||||
// Setup broker networks
|
||||
bridgeBrokers("Broker_A_A", "Broker_B_B");
|
||||
bridgeBrokers("Broker_B_B", "Broker_C_C");
|
||||
bridgeBrokers("Broker_C_C", "Broker_D_D");
|
||||
bridgeBrokers("Broker_D_D", "Broker_E_E");
|
||||
|
||||
if (!duplex) {
|
||||
bridgeBrokers("Broker_B_B", "Broker_A_A");
|
||||
bridgeBrokers("Broker_C_C", "Broker_B_B");
|
||||
bridgeBrokers("Broker_D_D", "Broker_C_C");
|
||||
bridgeBrokers("Broker_E_E", "Broker_D_D");
|
||||
}
|
||||
|
||||
startAllBrokers();
|
||||
|
||||
// Setup destination
|
||||
|
@ -139,12 +124,6 @@ public class DurableFiveBrokerNetworkBridgeTest extends JmsMultipleBrokersTestSu
|
|||
bridgeBrokers("Broker_B_B", "Broker_C_C");
|
||||
bridgeBrokers("Broker_C_C", "Broker_D_D");
|
||||
bridgeBrokers("Broker_D_D", "Broker_E_E");
|
||||
if (!duplex) {
|
||||
bridgeBrokers("Broker_B_B", "Broker_A_A");
|
||||
bridgeBrokers("Broker_C_C", "Broker_B_B");
|
||||
bridgeBrokers("Broker_D_D", "Broker_C_C");
|
||||
bridgeBrokers("Broker_E_E", "Broker_D_D");
|
||||
}
|
||||
|
||||
startAllBrokers();
|
||||
|
||||
|
|
Loading…
Reference in New Issue