activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r367598 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
Date Tue, 10 Jan 2006 13:37:01 GMT
Author: rajdavies
Date: Tue Jan 10 05:36:55 2006
New Revision: 367598

URL: http://svn.apache.org/viewcvs?rev=367598&view=rev
Log:
applied proper fix for AMQ-464

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java?rev=367598&r1=367597&r2=367598&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
Tue Jan 10 05:36:55 2006
@@ -359,8 +359,12 @@
                             
                         }
                     }
-                    localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, demandConsumerDispatched));
-                                   
+                    sub.dispatched++;
+                    if( sub.dispatched > (sub.localInfo.getPrefetchSize()*.75) ) {
+                        localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE,
sub.dispatched));
+                        sub.dispatched=0;
+                    } 
+                                                     
                 }
             } else if ( command.isBrokerInfo() ) {
                 synchronized( this ) {



Mime
View raw message