mirror of https://github.com/apache/activemq.git
Add network consumer id to a DemandSubscription
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@636428 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f9cc04e5db
commit
8fd41894ca
|
@ -38,8 +38,9 @@ public class DemandSubscription {
|
||||||
remoteInfo = info;
|
remoteInfo = info;
|
||||||
localInfo = info.copy();
|
localInfo = info.copy();
|
||||||
localInfo.setBrokerPath(info.getBrokerPath());
|
localInfo.setBrokerPath(info.getBrokerPath());
|
||||||
remoteSubsIds.add(info.getConsumerId());
|
localInfo.setNetworkSubscription(true);
|
||||||
}
|
remoteSubsIds.add(info.getConsumerId());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increment the consumers associated with this subscription
|
* Increment the consumers associated with this subscription
|
||||||
|
@ -47,7 +48,10 @@ public class DemandSubscription {
|
||||||
* @param id
|
* @param id
|
||||||
* @return true if added
|
* @return true if added
|
||||||
*/
|
*/
|
||||||
public boolean add(ConsumerId id) {
|
public boolean add(ConsumerId id) {
|
||||||
|
if (localInfo != null) {
|
||||||
|
localInfo.addNetworkConsumerId(id);
|
||||||
|
}
|
||||||
return remoteSubsIds.add(id);
|
return remoteSubsIds.add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,9 +59,12 @@ public class DemandSubscription {
|
||||||
* Increment the consumers associated with this subscription
|
* Increment the consumers associated with this subscription
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return true if added
|
* @return true if removed
|
||||||
*/
|
*/
|
||||||
public boolean remove(ConsumerId id) {
|
public boolean remove(ConsumerId id) {
|
||||||
|
if (localInfo != null) {
|
||||||
|
localInfo.removeNetworkConsumerId(id);
|
||||||
|
}
|
||||||
return remoteSubsIds.remove(id);
|
return remoteSubsIds.remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue