diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
index dbb69f8..3fb8592 100755
--- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
+++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
@@ -2298,4 +2298,8 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
     public long getConsumerFailoverRedeliveryWaitPeriod() {
         return consumerFailoverRedeliveryWaitPeriod;
     }
+
+    protected CopyOnWriteArrayList<ActiveMQSession> getSessions() {
+        return sessions;
+    }
 }
diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
index a9495e8..f65f7b1 100755
--- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
+++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
@@ -115,6 +115,9 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
     protected final ActiveMQSession session;
     protected final ConsumerInfo info;
 
+    static {
+        System.err.println(ActiveMQMessageConsumer.class + " patched with: https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=commit;h=c34851fd");
+    }
     // These are the messages waiting to be delivered to the client
     protected final MessageDispatchChannel unconsumedMessages = new MessageDispatchChannel();
 
@@ -1234,36 +1237,20 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
                             }
                         }
                     } else {
-                        if (!session.isTransacted()) {
+                        // deal with duplicate delivery
+                        ConsumerId consumerWithPendingTransaction;
+                        if (redeliveryExpectedInCurrentTransaction(md, true)) {
                             if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " ignoring (auto acking) duplicate: " + md.getMessage());
+                                LOG.debug(getConsumerId() + " tracking transacted redelivery " + md.getMessage());
                             }
-                            MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
-                            session.sendAck(ack);
+                            session.sendAck(new MessageAck(md, MessageAck.DELIVERED_ACK_TYPE, 1));
+                        } else if ((consumerWithPendingTransaction = redeliveryPendingInCompetingTransaction(md)) != null) {
+                            LOG.warn(getConsumerId() + " delivering duplicate " + md.getMessage() + ", pending transaction completion on " + consumerWithPendingTransaction + " will rollback");
+                            session.getConnection().rollbackDuplicate(this, md.getMessage());
+                            dispatch(md);
                         } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(getConsumerId() + " tracking transacted redlivery of duplicate: " + md.getMessage());
-                            }
-                            boolean needsPoisonAck = false;
-                            synchronized (deliveredMessages) {
-                                if (previouslyDeliveredMessages != null) {
-                                    previouslyDeliveredMessages.put(md.getMessage().getMessageId(), true);
-                                } else {
-                                    // delivery while pending redelivery to another consumer on the same connection
-                                    // not waiting for redelivery will help here
-                                    needsPoisonAck = true;
-                                }
-                            }
-                            if (needsPoisonAck) {
-                                LOG.warn("acking duplicate delivery as poison, redelivery must be pending to another"
-                                        + " consumer on this connection, failoverRedeliveryWaitPeriod=" 
-                                        + failoverRedeliveryWaitPeriod + ". Message: " + md);
-                                MessageAck poisonAck = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
-                                poisonAck.setFirstMessageId(md.getMessage().getMessageId());
-                                session.sendAck(poisonAck);
-                            } else {
-                                ackLater(md, MessageAck.DELIVERED_ACK_TYPE);
-                            }
+                            LOG.warn(getConsumerId() + " suppressing duplicate delivery on connection, poison acking: " + md);
+                            posionAck(md, "Suppressing duplicate delivery on connection, consumer " + getConsumerId());
                         }
                     }
                 }
@@ -1277,6 +1264,40 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
         }
     }
 
+    private void posionAck(MessageDispatch md, String cause) throws JMSException {
+        MessageAck posionAck = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
+        posionAck.setFirstMessageId(md.getMessage().getMessageId());
+        session.sendAck(posionAck);
+    }
+
+    private boolean redeliveryExpectedInCurrentTransaction(MessageDispatch md, boolean markReceipt) {
+        if (session.isTransacted()) {
+            synchronized (deliveredMessages) {
+                if (previouslyDeliveredMessages != null) {
+                    if (previouslyDeliveredMessages.containsKey(md.getMessage().getMessageId())) {
+                        if (markReceipt) {
+                            previouslyDeliveredMessages.put(md.getMessage().getMessageId(), true);
+                        }
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+
+    private ConsumerId redeliveryPendingInCompetingTransaction(MessageDispatch md) {
+        for (ActiveMQSession activeMQSession: session.connection.getSessions()) {
+            for (ActiveMQMessageConsumer activeMQMessageConsumer : activeMQSession.consumers) {
+                if (activeMQMessageConsumer.redeliveryExpectedInCurrentTransaction(md, false)) {
+                    return activeMQMessageConsumer.getConsumerId();
+                }
+            }
+        }
+        return null;
+    }
+
+
     // async (on next call) clear or track delivered as they may be flagged as duplicates if they arrive again
     private void clearDispatchList() {
         if (clearDispatchList) {
diff --git a/pom.xml b/pom.xml
index 1f30917..a53e9ec 100755
--- a/pom.xml
+++ b/pom.xml
@@ -111,6 +111,13 @@
     <maven>2.0.9</maven>
   </prerequisites>
 
+  <repositories>
+    <repository>
+      <id>m2_proxy</id>
+      <name>fuse</name>
+      <url>http://repository.jboss.org/nexus/content/groups/m2-proxy</url>
+    </repository>
+  </repositories>
 
   
   <modules>
