mirror of https://github.com/apache/activemq.git
Fix for AMQ-464
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f0454b1e88
commit
c68a1460ba
|
@ -323,7 +323,7 @@ public class DemandForwardingBridge implements Bridge {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void serviceLocalCommand(Command command) {
|
protected void serviceLocalCommand(Command command) {
|
||||||
boolean trace = log.isTraceEnabled();
|
final boolean trace = log.isTraceEnabled();
|
||||||
try {
|
try {
|
||||||
if( command.isMessageDispatch() ) {
|
if( command.isMessageDispatch() ) {
|
||||||
MessageDispatch md = (MessageDispatch) command;
|
MessageDispatch md = (MessageDispatch) command;
|
||||||
|
@ -349,12 +349,8 @@ public class DemandForwardingBridge implements Bridge {
|
||||||
log.trace("bridging " + localBroker + " -> " + remoteBroker + ": "+message);
|
log.trace("bridging " + localBroker + " -> " + remoteBroker + ": "+message);
|
||||||
|
|
||||||
remoteBroker.oneway( message );
|
remoteBroker.oneway( message );
|
||||||
|
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, demandConsumerDispatched));
|
|
||||||
sub.dispatched=0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if ( command.isBrokerInfo() ) {
|
} else if ( command.isBrokerInfo() ) {
|
||||||
synchronized( this ) {
|
synchronized( this ) {
|
||||||
|
|
Loading…
Reference in New Issue