mirror of https://github.com/apache/activemq.git
test case for AMQ-4356 validates this git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1489471 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b8a7e9990b
commit
ba37cbb1de
|
@ -33,6 +33,7 @@ import org.apache.activemq.command.ProducerInfo;
|
|||
import org.apache.activemq.store.MessageStore;
|
||||
import org.apache.activemq.usage.MemoryUsage;
|
||||
import org.apache.activemq.usage.Usage;
|
||||
import org.apache.activemq.util.SubscriptionKey;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -386,4 +387,10 @@ public class DestinationFilter implements Destination {
|
|||
public boolean isDLQ() {
|
||||
return next.isDLQ();
|
||||
}
|
||||
|
||||
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
|
||||
if (next instanceof Topic) {
|
||||
((Topic) next).deleteSubscription(context, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import javax.jms.JMSException;
|
|||
import org.apache.activemq.advisory.AdvisorySupport;
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.broker.region.policy.PolicyEntry;
|
||||
import org.apache.activemq.broker.region.virtual.VirtualTopicInterceptor;
|
||||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ConnectionId;
|
||||
import org.apache.activemq.command.ConsumerId;
|
||||
|
@ -198,9 +197,9 @@ public class TopicRegion extends AbstractRegion {
|
|||
if (dest instanceof Topic){
|
||||
Topic topic = (Topic)dest;
|
||||
topic.deleteSubscription(context, key);
|
||||
} else if (dest instanceof VirtualTopicInterceptor) {
|
||||
VirtualTopicInterceptor virtualTopic = (VirtualTopicInterceptor) dest;
|
||||
virtualTopic.getTopic().deleteSubscription(context, key);
|
||||
} else if (dest instanceof DestinationFilter) {
|
||||
DestinationFilter filter = (DestinationFilter) dest;
|
||||
filter.deleteSubscription(context, key);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
|
|
@ -26,8 +26,7 @@ import org.apache.activemq.command.Message;
|
|||
import org.apache.activemq.util.LRUCache;
|
||||
|
||||
/**
|
||||
* A Destination which implements <a
|
||||
* href="http://activemq.org/site/virtual-destinations.html">Virtual Topic</a>
|
||||
* A Destination which implements <a href="http://activemq.org/site/virtual-destinations.html">Virtual Topic</a>
|
||||
*/
|
||||
public class VirtualTopicInterceptor extends DestinationFilter {
|
||||
|
||||
|
|
Loading…
Reference in New Issue