mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-2665 - regression, keepDurableSubsActive is not properly propagated to the durable subscription leading to increasing consumer list
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1360085 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
425fa47360
commit
e66967bff1
|
@ -181,7 +181,6 @@ public class RegionBroker extends EmptyBroker {
|
|||
|
||||
@Override
|
||||
public void start() throws Exception {
|
||||
((TopicRegion)topicRegion).setKeepDurableSubsActive(keepDurableSubsActive);
|
||||
started = true;
|
||||
queueRegion.start();
|
||||
topicRegion.start();
|
||||
|
@ -722,6 +721,7 @@ public class RegionBroker extends EmptyBroker {
|
|||
|
||||
public void setKeepDurableSubsActive(boolean keepDurableSubsActive) {
|
||||
this.keepDurableSubsActive = keepDurableSubsActive;
|
||||
((TopicRegion)topicRegion).setKeepDurableSubsActive(keepDurableSubsActive);
|
||||
}
|
||||
|
||||
public DestinationInterceptor getDestinationInterceptor() {
|
||||
|
|
|
@ -76,6 +76,7 @@ public class DurableSubscriptionActivationTest extends org.apache.activemq.TestS
|
|||
broker.setDestinations(new ActiveMQDestination[]{topic});
|
||||
|
||||
broker.start();
|
||||
broker.waitUntilStarted();
|
||||
|
||||
connection = createConnection();
|
||||
}
|
||||
|
@ -83,8 +84,10 @@ public class DurableSubscriptionActivationTest extends org.apache.activemq.TestS
|
|||
private void destroyBroker() throws Exception {
|
||||
if (connection != null)
|
||||
connection.close();
|
||||
if (broker != null)
|
||||
if (broker != null) {
|
||||
broker.stop();
|
||||
broker.waitUntilStopped();
|
||||
}
|
||||
}
|
||||
|
||||
public void testActivateWithExistingTopic1() throws Exception {
|
||||
|
@ -121,6 +124,8 @@ public class DurableSubscriptionActivationTest extends org.apache.activemq.TestS
|
|||
// restart the broker
|
||||
restartBroker();
|
||||
|
||||
Destination d1 = broker.getDestination(topic);
|
||||
|
||||
// activate
|
||||
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
session.createDurableSubscriber(topic, "SubsId");
|
||||
|
@ -136,4 +141,5 @@ public class DurableSubscriptionActivationTest extends org.apache.activemq.TestS
|
|||
|
||||
assertTrue("More than one consumer found: " + d.getConsumers().size(), d.getConsumers().size() == 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue