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,7 +189,8 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
||||||
this.session.removeConsumer(this);
|
this.session.removeConsumer(this);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge();
|
this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge()
|
||||||
|
&&!info.isDurable()&&!info.getDestination().isQueue();
|
||||||
if(session.connection.isStarted())
|
if(session.connection.isStarted())
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
@ -508,6 +509,10 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearMessagesInProgress(){
|
||||||
|
unconsumedMessages.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public void dispose() throws JMSException {
|
public void dispose() throws JMSException {
|
||||||
if (!unconsumedMessages.isClosed()) {
|
if (!unconsumedMessages.isClosed()) {
|
||||||
// Do we have any acks we need to send out before closing?
|
// Do we have any acks we need to send out before closing?
|
||||||
|
|
Loading…
Reference in New Issue