mirror of
https://github.com/apache/activemq.git
synced 2025-02-16 23:16:52 +00:00
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@587033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99966f58e7
commit
36486fe5b4
@ -128,7 +128,7 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
|
||||
} else {
|
||||
redeliveredMessages.put(node.getMessageId(), Integer.valueOf(1));
|
||||
}
|
||||
if (keepDurableSubsActive) {
|
||||
if (keepDurableSubsActive&& pending.isTransient()) {
|
||||
synchronized (pending) {
|
||||
pending.addMessageFirst(node);
|
||||
}
|
||||
@ -137,7 +137,7 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
|
||||
}
|
||||
iter.remove();
|
||||
}
|
||||
if (!keepDurableSubsActive) {
|
||||
if (!keepDurableSubsActive && pending.isTransient()) {
|
||||
synchronized (pending) {
|
||||
try {
|
||||
pending.reset();
|
||||
|
@ -234,6 +234,10 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||
audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isTransient() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
protected synchronized boolean isDuplicate(MessageId messageId) {
|
||||
|
@ -280,6 +280,10 @@ public class FilePendingMessageCursor extends AbstractPendingMessageCursor imple
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isTransient() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean isSpaceInMemoryList() {
|
||||
return hasSpace() && isDiskListEmpty();
|
||||
|
@ -241,6 +241,12 @@ public interface PendingMessageCursor extends Service {
|
||||
* @param enableAudit the enableAudit to set
|
||||
*/
|
||||
public void setEnableAudit(boolean enableAudit);
|
||||
|
||||
/**
|
||||
* @return true if the underlying state of this cursor
|
||||
* disappears when the broker shuts down
|
||||
*/
|
||||
public boolean isTransient();
|
||||
|
||||
|
||||
}
|
||||
|
@ -142,4 +142,8 @@ public class VMPendingMessageCursor extends AbstractPendingMessageCursor {
|
||||
public LinkedList<MessageReference> pageInList(int maxItems) {
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean isTransient() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user