diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index ce7fd2a3e5..921845ce11 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -2515,12 +2515,14 @@ public class BrokerService implements Service { // created at startup, so no sync needed if (virtualConsumerDestinationFilter == null) { Set consumerDestinations = new HashSet(); - for (DestinationInterceptor interceptor : destinationInterceptors) { - if (interceptor instanceof VirtualDestinationInterceptor) { - VirtualDestinationInterceptor virtualDestinationInterceptor = (VirtualDestinationInterceptor) interceptor; - for (VirtualDestination virtualDestination: virtualDestinationInterceptor.getVirtualDestinations()) { - if (virtualDestination instanceof VirtualTopic) { - consumerDestinations.add(new ActiveMQQueue(((VirtualTopic) virtualDestination).getPrefix() + DestinationFilter.ANY_DESCENDENT)); + if (destinationInterceptors != null) { + for (DestinationInterceptor interceptor : destinationInterceptors) { + if (interceptor instanceof VirtualDestinationInterceptor) { + VirtualDestinationInterceptor virtualDestinationInterceptor = (VirtualDestinationInterceptor) interceptor; + for (VirtualDestination virtualDestination: virtualDestinationInterceptor.getVirtualDestinations()) { + if (virtualDestination instanceof VirtualTopic) { + consumerDestinations.add(new ActiveMQQueue(((VirtualTopic) virtualDestination).getPrefix() + DestinationFilter.ANY_DESCENDENT)); + } } } }