Dejan Bosanac <de...@nighttale.net> writes: > Hi, > > it's not a but. With client ack, the ack you send will acknowledge all > message up to the one you're sending ack for. So if you send acks > out of order, you'll get "unexpected ack" message.
Interesting, I presume this is ActiveMQ's own interpretation of a STOMP protocol? is this the official protocol definition? http://stomp.codehaus.org/Protocol because there under ACK it doesn't mention anything about "up to" and no matter how hard I try I couldn't see a way the spec could be interpreted that way. > > You can use client-individual ack to achieve your desired > functionality (http://issues.apache.org/activemq/browse/AMQ-1874) IMHO, this should have been the default behaviour. > > Cheers > -- > Dejan Bosanac - http://twitter.com/dejanb > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > > On Thu, Dec 17, 2009 at 10:25 AM, Aleksandar Ivanisevic > <aleksan...@ivanisevic.de> wrote: >> >> Hi, >> >> I have a consumer with prefetch>1 and client ack. If I send the acks >> out of order (not in the order the messages are received), I get an >> exception: >> >> org.apache.activemq.transport.stomp.ProtocolException: Unexpected ACK >> received for message-id >> >> is this in JMS specification that acks need to be received in the same >> order or is it STOMP bug? >> >> If it is supposed to be like that, how is one supposed to handle >> messages in parallel? Have a separate consumer for each thread? >> >> Hm, just found out that when I get this exception the message never >> gets redelivered, so this must be a STOMP bug, right? >> >> >> >