[ 
https://issues.apache.org/jira/browse/AMQ-8168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17322766#comment-17322766
 ] 

Gary Tully commented on AMQ-8168:
---------------------------------

The test works ok with the workaround and tcp
{code:java}
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 fbc0212f58..5d432f0a25 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
@@ -40,6 +40,7 @@ public class BrokerRedeliveryTest extends 
org.apache.activemq.TestSupport {
 
     static final Logger LOG = 
LoggerFactory.getLogger(BrokerRedeliveryTest.class);
     BrokerService broker = null;
+    TransportConnector tcpConnector = null;
 
     final ActiveMQQueue destination = new ActiveMQQueue("Redelivery");
     final String data = "hi";
@@ -206,6 +207,7 @@ public class BrokerRedeliveryTest extends 
org.apache.activemq.TestSupport {
         broker = new BrokerService();
         broker.setPersistent(persistent);
         broker.setSchedulerSupport(true);
+        tcpConnector = broker.addConnector("tcp://localhost:0");
 
         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:(" + 
tcpConnector.getPublishableConnectString() + ")?jms.checkForDuplicates=false");
     }
 
     @Override {code}

> Server-side redelivery no longer working with 5.16.x
> ----------------------------------------------------
>
>                 Key: AMQ-8168
>                 URL: https://issues.apache.org/jira/browse/AMQ-8168
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.16.1
>            Reporter: Martin Lichtin
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 5.16.2
>
>         Attachments: BrokerRedeliveryTest.java
>
>
> Server-side redelivery no longer working with 5.16.x
> Server-side redeliveries triggered by the redeliveryPlugin can no longer be 
> consumed, as they are (incorrectly) suppressed.
> Logs from a test show "suppressing duplicate delivery on connection, poison 
> acking":
> {noformat}
>        RedeliveryPlugin  175 | 40 - org.apache.activemq.activemq-osgi - 
> 5.16.1 | redelivery #1 of: ID:mlipc2-4159-1611768583683-1:15:1:1:41 with 
> delay: 1000, dest: queue://TEST2.msgin
> ActiveMQMessageConsumer 1485 | 40 - org.apache.activemq.activemq-osgi - 
> 5.16.1 | ID:mlipc2-4159-1611768583683-1:16:1:1 suppressing duplicate delivery 
> on connection, poison acking: MessageDispatch {commandId = 0, 
> responseRequired = false, consumerId = ID:mlipc2-4159-1611768583683-1:16:1:1, 
> destination = queue://TEST2.msgin, message = ActiveMQTextMessage {commandId = 
> 125, responseRequired = true, messageId = 
> ID:mlipc2-4159-1611768583683-1:15:1:1:41, originalDestination = null, 
> originalTransactionId = null, producerId = 
> ID:mlipc2-4159-1611768583683-1:15:1:1, destination = queue://TEST2.msgin, 
> transactionId = null, expiration = 0, timestamp = 1611768605501, arrival = 0, 
> brokerInTime = 1611768607001, brokerOutTime = 1611768607012, correlationId = 
> null, replyTo = null, persistent = true, type = null, priority = 0, groupID = 
> null, groupSequence = 0, targetConsumerId = null, compressed = false, userID 
> = null, content = org.apache.activemq.util.ByteSequence@5f105a66, 
> marshalledProperties = org.apache.activemq.util.ByteSequence@5b2fd55c, 
> dataStructure = null, redeliveryCounter = 1, size = 0, properties = 
> {redeliveryDelay=1000, 
> scheduledJobId=ID:mlipc2-4159-1611768583683-1:15:1:1:2}, readOnlyProperties = 
> true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = 
> false, text = XXX}, redeliveryCounter = 1}
> {noformat}
> To reproduce the issue, use existing test "BrokerRedeliveryTest" and modify 
> slightly, so it's using a failover connection.
> {noformat}
>    protected ActiveMQConnectionFactory createConnectionFactory() throws 
> Exception {
> -        return new ActiveMQConnectionFactory("vm://localhost");
> +        return new ActiveMQConnectionFactory("failover:(vm://localhost)");
>    }   @Override{noformat}
> After this change to the test, tests start to fail and one sees the symptom 
> logged as:
> {noformat}
> ... suppressing duplicate delivery on connection, poison acking ... {noformat}
> See also AMQ-7298



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to