diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index 79cf093d28..75f1504bbb 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -800,18 +800,15 @@ public class Queue extends BaseDestination implements Task, UsageListener { ArrayList syncs = new ArrayList(orderedWork.size());; sendLock.lockInterruptibly(); - try { for (Transaction tx : orderedWork) { - SendSync sync = sendSyncs.get(tx); + SendSync sync = sendSyncs.remove(tx); sync.processSend(); syncs.add(sync); - sendSyncs.remove(tx); } } finally { sendLock.unlock(); } - for (SendSync sync : syncs) { sync.processSent(); }