From c6e0984e1dbf4afce4ac475e3f3c0bc29816bdf6 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Thu, 4 May 2006 03:45:59 +0000 Subject: [PATCH] Enable optimized ack by default again but disable the broker from sending the prefetch resize command to the client.. the client still has not implemented proper thread safe handling for that. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@399530 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/ActiveMQConnectionFactory.java | 2 +- .../org/apache/activemq/broker/region/PrefetchSubscription.java | 2 ++ .../org/apache/activemq/broker/region/TopicSubscription.java | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java index 0bfd987629..fd68aeda09 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java @@ -82,7 +82,7 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne protected boolean asyncDispatch = false; protected boolean alwaysSessionAsync=true; private boolean useAsyncSend = false; - private boolean optimizeAcknowledge = false; + private boolean optimizeAcknowledge = true; private int closeTimeout = 15000; private boolean useRetroactiveConsumer; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java index d97351e205..de05c2a464 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java @@ -251,6 +251,7 @@ abstract public class PrefetchSubscription extends AbstractSubscription{ * */ public void optimizePrefetch(){ + /* if(info!=null&&info.isOptimizedAcknowledge()&&context!=null&&context.getConnection()!=null &&context.getConnection().isManageable()){ if(info.getCurrentPrefetchSize()!=info.getPrefetchSize() && isLowWaterMark()){ @@ -262,6 +263,7 @@ abstract public class PrefetchSubscription extends AbstractSubscription{ updateConsumerPrefetch(1); } } + */ } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java index e82725f120..4eb94fb7f1 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java @@ -271,6 +271,7 @@ public class TopicSubscription extends AbstractSubscription{ * */ public void optimizePrefetch(){ + /* if(info!=null&&info.isOptimizedAcknowledge()&&context!=null&&context.getConnection()!=null &&context.getConnection().isManageable()){ if(info.getCurrentPrefetchSize()!=info.getPrefetchSize() && isLowWaterMark()){ @@ -282,6 +283,7 @@ public class TopicSubscription extends AbstractSubscription{ updateConsumerPrefetch(1); } } + */ } private void dispatchMatched() throws IOException{