applied proper fix for AMQ-464

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@367598 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-01-10 13:36:55 +00:00
parent 1c02c36bdc
commit fb53ad9cf3
1 changed files with 6 additions and 2 deletions

View File

@ -359,8 +359,12 @@ public class DemandForwardingBridge implements Bridge {
}
}
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 ) {