mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@742876 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
504bcf0596
commit
586ea12d1e
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq;
|
package org.apache.activemq;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
@ -685,9 +686,14 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
||||||
if (session.isClientAcknowledge()) {
|
if (session.isClientAcknowledge()) {
|
||||||
if (!this.info.isBrowser()) {
|
if (!this.info.isBrowser()) {
|
||||||
// rollback duplicates that aren't acknowledged
|
// rollback duplicates that aren't acknowledged
|
||||||
for (MessageDispatch old : deliveredMessages) {
|
List<MessageDispatch> tmp = null;
|
||||||
session.connection.rollbackDuplicate(this, old.getMessage());
|
synchronized (this.deliveredMessages) {
|
||||||
|
tmp = new ArrayList<MessageDispatch>(this.deliveredMessages);
|
||||||
}
|
}
|
||||||
|
for (MessageDispatch old : tmp) {
|
||||||
|
this.session.connection.rollbackDuplicate(this, old.getMessage());
|
||||||
|
}
|
||||||
|
tmp.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!session.isTransacted()) {
|
if (!session.isTransacted()) {
|
||||||
|
|
Loading…
Reference in New Issue