activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r366176 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
Date Thu, 05 Jan 2006 13:04:34 GMT
Author: rajdavies
Date: Thu Jan  5 05:04:31 2006
New Revision: 366176

URL: http://svn.apache.org/viewcvs?rev=366176&view=rev
Log:
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=366176&r1=366175&r2=366176&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
Thu Jan  5 05:04:31 2006
@@ -323,7 +323,7 @@
     }
     
     protected void serviceLocalCommand(Command command) {
-        boolean trace = log.isTraceEnabled();
+        final boolean trace = log.isTraceEnabled();
         try {
             if( command.isMessageDispatch() ) {
                 MessageDispatch md = (MessageDispatch) command;
@@ -349,12 +349,8 @@
                         log.trace("bridging " + localBroker + " -> " + remoteBroker +
": "+message);
                     
                     remoteBroker.oneway( message );
-
-                    sub.dispatched++;
-                    if( sub.dispatched > (sub.localInfo.getPrefetchSize()*.75) ) {
-                        localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE,
demandConsumerDispatched));
-                        sub.dispatched=0;
-                    }                    
+                    localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, demandConsumerDispatched));
+                                   
                 }
             } else if ( command.isBrokerInfo() ) {
                 synchronized( this ) {



Mime
View raw message