Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-8095

Impossible to ack some messages from a JMS ActiveMQ Consumer after ActiveMQ Slave Broker becomes Master

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.16.0
    • None
    • Broker, JMS client, Transport
    • None

    Description

      Hi,

      I am facing an issue that I cannot understand properly. I have 2 ActiveMQ Brokers (Master/Slave - version 5.16.0) with one JMS producer and one JMS consumer, both connected in HTTP to the broker with this failoverURI : http://vm-hub-1:61617,http://vm-hub-2:61617

      I am testing the High Availability with multiple tests and the following one fails :

      • Injecting messages to ActiveMQ from the Producer to a VirtualTopic
      • Consuming this VirtualTopic messages from the Consumer
      • Stopping the ActiveMQ Master so that the Slave becomes the master
      • Checking that the producer is still injecting messages and the consumer is still consuming without losses.

      Each time I stop the ActiveMQ Master while messages are still being injected and consumed, I get the following error on the consumer side :

      java.io.IOException: Could not post command: MessageAck {commandId = 801, responseRequired = true, ackType = 1, consumerId = ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1, firstMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, lastMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, destination = queue://Consumer.consumer_1.VirtualTopic.VIRTUALTOPIC_1, transactionId = null, messageCount = 1, poisonCause = java.lang.Throwable: Suppressing duplicate delivery on connection, consumer ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1} due to: java.io.IOException: Failed to post command: MessageAck {commandId = 801, responseRequired = true, ackType = 1, consumerId = ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1, firstMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, lastMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, destination = queue://Consumer.consumer_1.VirtualTopic.VIRTUALTOPIC_1, transactionId = null, messageCount = 1, poisonCause = java.lang.Throwable: Suppressing duplicate delivery on connection, consumer ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1} as response was: HttpResponseProxy{HTTP/1.1 500 Server Error [Server: nginx, Date: Mon, 30 Nov 2020 20:22:22 GMT, Content-Type: text/html;charset=iso-8859-1, Transfer-Encoding: chunked, Connection: keep-alive, Cache-Control: must-revalidate,no-cache,no-store, Strict-Transport-Security: max-age=31536000; includeSubDomains] ResponseEntityProxy{[Content-Type: text/html;charset=iso-8859-1,Chunked: true]}}
          at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:34) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:139) ~[activemq-http-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:335) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:317) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:668) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1392) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1436) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:2095) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQSession.sendAck(ActiveMQSession.java:2249) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQSession.sendAck(ActiveMQSession.java:2242) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQMessageConsumer.posionAck(ActiveMQMessageConsumer.java:548) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1486) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) ~[activemq-client-5.16.0.jar:5.16.0]
          at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) ~[activemq-client-5.16.0.jar:5.16.0]
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
          at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
      Caused by: java.io.IOException: Failed to post command: MessageAck {commandId = 801, responseRequired = true, ackType = 1, consumerId = ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1, firstMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, lastMessageId = ID:adrienc-ThinkPad-T470p-44545-1606767699632-1:5:1:1:2336, destination = queue://Consumer.consumer_1.VirtualTopic.VIRTUALTOPIC_1, transactionId = null, messageCount = 1, poisonCause = java.lang.Throwable: Suppressing duplicate delivery on connection, consumer ID:adrienc-ThinkPad-T470p-33711-1606767701957-1:5:1:1} as response was: HttpResponseProxy{HTTP/1.1 500 Server Error [Server: nginx, Date: Mon, 30 Nov 2020 20:22:22 GMT, Content-Type: text/html;charset=iso-8859-1, Transfer-Encoding: chunked, Connection: keep-alive, Cache-Control: must-revalidate,no-cache,no-store, Strict-Transport-Security: max-age=31536000; includeSubDomains] ResponseEntityProxy{[Content-Type: text/html;charset=iso-8859-1,Chunked: true]}}
          at org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:129) ~[activemq-http-5.16.0.jar:5.16.0]
          ... 20 common frames omitted
      

      Once this error occurs, all the other messages are stuck into ActiveMQ Broker because one message has not been acknowledged properly.

      It feels like my consumer cannot ack one message to the new Master broker.

      Have you faced this issue before ?

      Thanks in advance for you help !

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            cadoad Adrien Cadoret
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: