You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Martin Lichtin (Jira)" <ji...@apache.org> on 2021/02/28 16:06:00 UTC
[jira] [Commented] (AMQ-7298) failover duplicate detection in error
with batched local transactions
[ https://issues.apache.org/jira/browse/AMQ-7298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17292431#comment-17292431 ]
Martin Lichtin commented on AMQ-7298:
-------------------------------------
To reproduce the issue I'm reporting above, use existing test "BrokerRedeliveryTest" and modify slightly, so it's using a failover connection.
{noformat}
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
index fbc0212f5..aecc54591 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
@@ -206,6 +207,7 @@ public class BrokerRedeliveryTest extends org.apache.activemq.TestSupport {
broker = new BrokerService();
broker.setPersistent(persistent);
broker.setSchedulerSupport(true);
+ broker.addConnector("nio://127.0.0.1:11111");
RedeliveryPlugin redeliveryPlugin = new RedeliveryPlugin();
@@ -231,7 +233,7 @@ public class BrokerRedeliveryTest extends org.apache.activemq.TestSupport { @Override
protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
- return new ActiveMQConnectionFactory("vm://localhost");
+ return new ActiveMQConnectionFactory("failover:(nio://127.0.0.1:11111)");
} @Override{noformat}
Most of the tests start to fail and you'll see the symptom logged as:
{noformat}
... suppressing duplicate delivery on connection, poison acking ... {noformat}
> failover duplicate detection in error with batched local transactions
> ---------------------------------------------------------------------
>
> Key: AMQ-7298
> URL: https://issues.apache.org/jira/browse/AMQ-7298
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.15.0
> Reporter: Gary Tully
> Assignee: Gary Tully
> Priority: Major
> Fix For: 5.16.0
>
>
> Messages can get poisonAcked in error as duplicate deliveries when a local transaction rollback during/after a failover (auto reconnect) event.
> The interaction between rollback and failover redelivery has a bunch of timing issues and did create duplicates in-error that resulted in over eager suppression.
> There are a bunch of related tests that validate expected behaviour, the related fixes needed to be revisited to better manage the delivered and unconsumed messages in the context of a local transaction and to avoid the real duplication of delivery in the client.
> There is an additional new test that demonstrates the additional dlq or duplicates behaviour.
> a nice cross section from the unit test suite is:
> mvn clean install -Dtest=CloseRollbackRedeliveryQueueTest,AMQ2149Test,JMSQueueRedeliverTest,RedeliveryPolicyTest,FailoverTransactionTest,FailoverDurableSubTransactionTest,JMSConsumerTest,JmsSessionRecoverTest,AMQ2751Test
--
This message was sent by Atlassian Jira
(v8.3.4#803005)