Add network consumer id to a DemandSubscription

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@636426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-03-12 17:11:51 +00:00
parent cb65470569
commit f9cc04e5db
1 changed files with 3 additions and 1 deletions

View File

@ -80,11 +80,13 @@ public class DurableConduitBridge extends ConduitBridge {
if (addToAlreadyInterestedConsumers(info)) {
return null; // don't want this subscription added
}
//add our original id to ourselves
info.addNetworkConsumerId(info.getConsumerId());
// not matched so create a new one
// but first, if it's durable - changed set the
// ConsumerId here - so it won't be removed if the
// durable subscriber goes away on the other end
if (info.isDurable() || (info.getDestination().isQueue() && !info.getDestination().isTemporary())) {
if (info.isDurable() || (info.getDestination().isQueue() && !info.getDestination().isTemporary())) {
info.setConsumerId(new ConsumerId(localSessionInfo.getSessionId(), consumerIdGenerator
.getNextSequenceId()));
}