title: ActiveMQ throwing Unmatched acknowledge exception
body: <pre><code>WARN | Async error occurred: javax.jms.JMSException: Unmatched acknowledge: MessageAck {commandId = 30, responseRequired = false, ackType = 2, consumerId = ID:PC02-DT-009-52405-1421153309991-1:3:10:1, firstMessageId = ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1, lastMessageId = ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1, destination = queue://DATA.DESTINATION, transactionId = null, messageCount = 1, poisonCause = null}; Could not find Message-ID ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1 in dispatched-list (start of ack)
  javax.jms.JMSException: Unmatched acknowledge: MessageAck {commandId = 30, responseRequired = false, ackType = 2, consumerId = ID:PC02-DT-009-52405-1421153309991-1:3:10:1, firstMessageId = ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1, lastMessageId = ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1, destination = queue://DATA.DESTINATION, transactionId = null, messageCount = 1, poisonCause = null}; Could not find Message-ID ID:PC02-DT-009-52360-1421152976467-1:4:11:1:1 in dispatched-list (start of ack)
      at org.apache.activemq.broker.region.PrefetchSubscription.assertAckMatchesDispatched(PrefetchSubscription.java:482)
      at org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:214)
      at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:426)
      at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:408)
      at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:77)
      at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:77)
      at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:287)
      at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:87)
      at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:508)
      at org.apache.activemq.command.MessageAck.visit(MessageAck.java:236)
      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
      at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
      at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
      at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
      atorg.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
  </code></pre>
  
  <p>That's the exception I get in the activeMQ log.
  Scenario: I have 10 consumers, and I have 100 messages in the destination queue to which the consumers are listening. Consumers are fetching the messages for some 10-20 messages but eventually stops fetching the messages from queue with the above exception. My understanding is that a consumer will be given a new message only on returning an acknowledgement(if I'm right that is)..
  JMS container:</p>
  
  <p><code>&lt;jms:listener-container container-type="default" connection-factory="jmsConsumerConnectionFactory"
                              acknowledge="auto"&gt;
          &lt;jms:listener destination="DATA.DESTINATION" ref="jmsMessageListener" concurrency="10-15" method="onMessage"/&gt;
      &lt;/jms:listener-container&gt;</code></p>
  
  <p>Any help is much appreciated, thank you!</p>