mirror of https://github.com/apache/activemq.git
some fixes for: https://issues.apache.org/jira/browse/AMQ-4487
Allow the maxProducersToAudit value to be set of Queue and QueueBrowser subscriptions which can help to workaround OOM errors on QueueBrowsers when there are more than the max number of producers audited. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1489180 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc4392bdde
commit
37ede54486
|
@ -834,6 +834,9 @@ public abstract class PrefetchSubscription extends AbstractSubscription {
|
|||
|
||||
public void setMaxProducersToAudit(int maxProducersToAudit) {
|
||||
this.maxProducersToAudit = maxProducersToAudit;
|
||||
if (this.pending != null) {
|
||||
this.pending.setMaxProducersToAudit(maxProducersToAudit);
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxAuditDepth() {
|
||||
|
@ -842,6 +845,9 @@ public abstract class PrefetchSubscription extends AbstractSubscription {
|
|||
|
||||
public void setMaxAuditDepth(int maxAuditDepth) {
|
||||
this.maxAuditDepth = maxAuditDepth;
|
||||
if (this.pending != null) {
|
||||
this.pending.setMaxAuditDepth(maxAuditDepth);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isUsePrefetchExtension() {
|
||||
|
|
|
@ -238,12 +238,14 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
configurePrefetch(sub);
|
||||
sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
|
||||
sub.setUsePrefetchExtension(isUsePrefetchExtension());
|
||||
sub.setMaxProducersToAudit(getMaxProducersToAudit());
|
||||
}
|
||||
|
||||
public void configure(Broker broker, SystemUsage memoryManager, QueueSubscription sub) {
|
||||
configurePrefetch(sub);
|
||||
sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
|
||||
sub.setUsePrefetchExtension(isUsePrefetchExtension());
|
||||
sub.setMaxProducersToAudit(getMaxProducersToAudit());
|
||||
}
|
||||
|
||||
public void configurePrefetch(Subscription subscription) {
|
||||
|
@ -774,7 +776,7 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
|
||||
public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) {
|
||||
this.cursorMemoryHighWaterMark = cursorMemoryHighWaterMark;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStoreUsageHighWaterMark(int storeUsageHighWaterMark) {
|
||||
this.storeUsageHighWaterMark = storeUsageHighWaterMark;
|
||||
|
|
Loading…
Reference in New Issue