diff --git a/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java b/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java index 2c984b64e8..40a88b0a7a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java +++ b/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java @@ -54,7 +54,7 @@ public class DurableConduitBridge extends ConduitBridge{ if(isPermissableDestination(dest) && !doesConsumerExist(dest)){ DemandSubscription sub=createDemandSubscription(dest); if(dest.isTopic()){ - sub.getLocalInfo().setSubcriptionName(getLocalBrokerName()+"_"+name); + sub.getLocalInfo().setSubcriptionName(getSubscriberName(dest)); } try{ addSubscription(sub); @@ -81,10 +81,16 @@ public class DurableConduitBridge extends ConduitBridge{ } if(info.isDurable()){ // set the subscriber name to something reproducible - info.setSubcriptionName(getLocalBrokerName()); + + info.setSubcriptionName(getSubscriberName(info.getDestination())); } return doCreateDemandSubscription(info); } + + protected String getSubscriberName(ActiveMQDestination dest){ + String subscriberName = getLocalBrokerName()+"_"+dest.getPhysicalName(); + return subscriberName; + } protected boolean doesConsumerExist(ActiveMQDestination dest){ DestinationFilter filter=DestinationFilter.parseFilter(dest);