The type of that Ack is 0 which is a DELIVERED_ACK_TYPE so it is not a cause for worry as it is sent to inform the prefetch logic. This is untidy behavior though. On close, it does not make sense to deliver a DELIVERED_ACK as the consumer is closing, also in the case of CLIENT_ACKNOWLEDGE, a ranged DELIVERED_ACK is not going to work well if some individual messages have been acked.
If you can produce a simple test case for this, please raise a jira issue so this can get resolved. Thanks, Gary, 2009/2/23 dwout <[email protected]>: > > Hi, > > I noticed that if I use INDIVIDUAL_ACKNOWLEDGE, I get an exception in the > ActiveMQ console when I close the consumer. > (ActiveMQMessageConsumer.close()). If I just switch to CLIENT_ACKNOWLEDGE, > then there is no exception. I don't know if I should worry about this. (I > need to use INDIVIDUAL_ACKNOWLEDGE) > > Here is what this exception looks like: > > ERROR Service - Async error occurred: > javax.jms.JMSException: Could not correlate ackno > wledgment with dispatched message: MessageAck {commandId = 15, > responseRequired = false, ackType = 0, consumer > Id = ID:xxx-1247-1235392106250-0:0:1:1, firstMessageId = > ID:xxx-1226-1235392076578-0:0:1:1:1, lastMe > ssageId = ID:xxx-1226-1235392076578-0:0:1:1:10, destination = > queue://myqueue, transactionId = null > , messageCount = 10} > javax.jms.JMSException: Could not correlate acknowledgment with dispatched > message: MessageAck {commandId = 15 > , responseRequired = false, ackType = 0, consumerId = > ID:xxx-1247-1235392106250-0:0:1:1, firstMessageId = > ID:xxx-1226-1235392076578-0:0:1:1:1, lastMessageId = > ID:xxx-1226-1235392076578-0:0:1:1:10, destinat > ion = queue://myqueue, transactionId = null, messageCount = 10} > at > org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:304) > at > org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373) > at > org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462) > at > org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194) > at > org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) > at > org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) > at > org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85) > at > org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456) > at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205) > at > org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305) > at > org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179) > at > org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68) > at > org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143) > at > org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206) > at > org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) > at > org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203) > at > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185) > at java.lang.Thread.run(Thread.java:619) > -- > View this message in context: > http://www.nabble.com/Exception-when-using-INDIVIDUAL_ACKNOWLEDGE-tp22161296p22161296.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com
