Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-830

"Unmatched acknowledge: MessageAck" with MQTT when dealing with messages of different qos

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.2
    • JBoss A-MQ 6.1
    • broker, mqtt
    • None
    • Hide

      Use provided test case mqtt-test.tgz.
      Simply run mvn test and it raises the above warning.

      Show
      Use provided test case mqtt-test.tgz. Simply run mvn test and it raises the above warning.

      When dispatching messages of different MQTT QoS level to a reconnect durable MQTT subscriber, the broker raises

      2014-10-10 14:43:34,115 WARN ActiveMQ BrokerService[broker] Task-1 - Async error occurred:
      javax.jms.JMSException: Unmatched acknowledge: MessageAck {commandId = 0, responseRequired = false, ackType = 2, consumerId = ID:mac.fritz.box-62188-1412945008667-1:3:-1:1, firstMessageId = null, lastMessageId = ID:mac.fritz.box-62188-1412945008667-1:2:-1:1:2, destination = topic://mqtt-test.a.b.c, transactionId = null, messageCount = 1, poisonCause = null}; Expected message count (1) differs from count in dispatched-list (2)
      	at org.apache.activemq.broker.region.PrefetchSubscription.assertAckMatchesDispatched(PrefetchSubscription.java:488)
      	at org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:212)
      	at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:412)
      	at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:466)
      	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:87)
      	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:277)
      	at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:97)
      	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:550)
      	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:245)
      	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:334)
      	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
      	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
      	at org.apache.activemq.transport.mqtt.MQTTInactivityMonitor.onCommand(MQTTInactivityMonitor.java:123)
      	at org.apache.activemq.transport.mqtt.MQTTTransportFilter.sendToActiveMQ(MQTTTransportFilter.java:91)
      	at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onActiveMQCommand(MQTTProtocolConverter.java:505)
      	at org.apache.activemq.transport.mqtt.MQTTTransportFilter.oneway(MQTTTransportFilter.java:66)
      	at org.apache.activemq.transport.mqtt.MQTTInactivityMonitor.doOnewaySend(MQTTInactivityMonitor.java:146)
      	at org.apache.activemq.transport.mqtt.MQTTInactivityMonitor.oneway(MQTTInactivityMonitor.java:135)
      	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
      	at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1415)
      	at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:934)
      	at org.apache.activemq.broker.TransportConnection.iterate(TransportConnection.java:980)
      	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
      	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      

      If message use the same QoS setting, the problem does not occur.

              dejanbosanac Dejan Bosanac
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: