mirror of https://github.com/apache/activemq.git
added support for clearing messages in-flight
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@393495 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
00d054a6c2
commit
52ee976ec8
|
@ -189,8 +189,9 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
|||
this.session.removeConsumer(this);
|
||||
throw e;
|
||||
}
|
||||
this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge();
|
||||
if (session.connection.isStarted())
|
||||
this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge()
|
||||
&&!info.isDurable()&&!info.getDestination().isQueue();
|
||||
if(session.connection.isStarted())
|
||||
start();
|
||||
}
|
||||
|
||||
|
@ -507,6 +508,10 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
|||
this.session.syncSendPacket(info.createRemoveCommand());
|
||||
}
|
||||
}
|
||||
|
||||
public void clearMessagesInProgress(){
|
||||
unconsumedMessages.clear();
|
||||
}
|
||||
|
||||
public void dispose() throws JMSException {
|
||||
if (!unconsumedMessages.isClosed()) {
|
||||
|
|
Loading…
Reference in New Issue